Trumpet Program Freqout Help!
Hi!·I am trying to make a trumpet-simulator and I am having a problem.· I am using many loops with Freqout and my problem is with the Period.· I want to keep a sustained note until I change the fingering of my buttons.· I have tried using Do Until loops and they work exactly how I want them to.· My problem is that I can hear every single time that the loop repeats itself with an interruption in the tone because I have to set a number value in the Period.· The only way I can keep a sustained note is by changing the Period to very very small (like 5 milliseconds); my problem here is that the small gap of interuption mixes with my Frequency and changes the sounding frequency to a much lower pitch.· The only solution I know is finding the mixed frequency and trying to set that to be the sounding frequency; my problem here is that I don't know how high the frequency is that is caused by the interruption.· I have everything else in the program working just perfectly.· Please help me ASAP (this project is due very soon).···
· Thanks!· Attached is my program (I can't really explain what's what though!)
![tongue.gif](http://forums.parallax.com/images/smilies/tongue.gif)
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Ideas:
Can you set the previous played note to 0 (duration/period) before playing the next one? (Like a MIDI message)
Can you make a loop to "count" the· Period and then set it on the FREQOUT command? (it will count the time the valves·(buttons) are press --> then set Period value for that time) Yes this might generate some delay on the simulation.
PRPROG
Another idea:
Set the value of Period to its longest value ---> kept track of the valve combination and var_button(partial)--> if the combination change ---> do a sound_off ---> set new frequout value.