プレイ日記
Hanzo rzsense
FFTを使わずに、周波数判定をする方法を考えてみました(既出でしたら恐縮です) 添付プログラムを打ち込んで実行すると、目標周波数を訊いてくるので、20から1760の範囲内で周波数を入力した後、マイクから音声を入力します。
14そうだね
プレイ済み
返信[1]
親投稿
Hanzo rzsense
目標周波数と全く異なる音声を入力している場合は、表示される波形は、速く流れるか、あるいは全く不規則な形に見えますが、目標周波数近傍の音声を入力している場合は、1周期分の波形が、ゆっくり流れるか、止まって見えます。 サンプリングした音声を、目標周波数の周期ごとに切り出して重ね合わせると、目標周波数以外の音声データは相殺され、目標周波数近傍の音声データが強調されます。 イメージ的には「共振」の有無で周波数を判定しているようなものです。
0そうだね
プレイ済み
返信[2]
親投稿
BeefJerkey SuperBeefJerkey
I need help. How to I make car 1 move to the right a little bit every time the A button is pressed?
0そうだね
未プレイ
返信[3]
親投稿
Hanzo rzsense
@BeefJerkey: I'm sorry I don't understand what do you want to know exactly, but I guess you want to avoid moving a sprite continuously. If so, the method is very easy. Could you refer to the attached photo? If you write "(0)" instead of "(2)" in line 8, a sprite will move continuously as long as you press A button.
0そうだね
プレイ済み
返信[4]
親投稿
BeefJerkey SuperBeefJerkey
What I really want is to adjust the position. I want it to go right when the button is pressed, not to simply set the position to something else. Relative position setting.
0そうだね
未プレイ
返信[5]
親投稿
Hanzo rzsense
Could you try the program in my previous photo and explain the difference between your purpose and my method?
0そうだね
プレイ済み
返信[6]
親投稿
BeefJerkey SuperBeefJerkey
I added that with the management number if the car and it did what I wanted! If only I knew what the code meant, then it would be more useful. And when it starts, even though I used SPOFS on it before to put it where I wanted, this seems to bring it back to the very top of the screen again. I wanted it to start at X10, Y20.
0そうだね
未プレイ
返信[7]
親投稿
Hanzo rzsense
Could you expose key of your program or attach screen shot on your play Journal in US SmileBASIC community? I'd like to grasp your purpose clearly.
0そうだね
プレイ済み
返信[8]
親投稿
BeefJerkey SuperBeefJerkey
I posted a screenshot. Also, I think I'll want the car to move a little further when the button is pressed. Thank you for trying to help me. I don't understand why getting a sprite to move bit by bit in response to a button press should be to difficult.
0そうだね
未プレイ
返信[9]
親投稿
BeefJerkey SuperBeefJerkey
With the BGMPLAY command, how do I make an 8-BIT sound? I just want that for the Ready, set, go thing at the beginning of a minigame.
0そうだね
未プレイ
返信[10]
親投稿
Hanzo rzsense
It is very difficult for me to tell you how to compose a music, just I can tell you is how to choose instrument for 8-BIT sound. Choose instrument @144-@150(square waves with various duty ratio) or @151(noise).
1そうだね
プレイ済み
返信[11]
親投稿
BeefJerkey SuperBeefJerkey
Thank you, that's all I wanted to know. Making music with BGMPLAY is like, the second thing I learned in SmileBASIC. I just didn't know how to pick an 8-BIT sound for it.
1そうだね
未プレイ