Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sound file playback (and record) - manipulating speed + pitch in realtime?
#4
(02-04-2025, 05:28 PM)hsiangch_ong Wrote: the easiest and dirtiest way.  playback with _sndraw while making computations on sample playback.  load a wave file and play back each sample frame with that procedure.  normal playback is rate of 1.  a higher rate produces a higher pitch and faster playback.  a lower rate, with a better chance one frame is played twice or more.  has issues with sound quality but it's the only way to get a lower frequency than root.  interpolation for lower pitches would only increase cpu usage.

a really fast computer would be needed to do it in realtime and to keep up with gui controls and that sort of thing.
I don't need a fancy GUI, just reading basic mouse input and displaying a number on screen in plain text will be enough. I have not done any _sndraw, are there any simple examples you would recommend that I can build off of? 

UPDATE: I just saw Petr's reply, will try playing with that... 


(02-04-2025, 09:14 PM)Petr Wrote: Here is an equalizer program where you can change the sound frequency by pressing + or minus:  https://qb64phoenix.com/forum/showthread...558&page=2  

Speed change - try this....

Code: (Select All)

f$ = "slunce.mp3" 'must be mp3 (use single array)
...
Print "End."

Oh cool - thanks!!
I'll give these a look and see if I can combine the functionality,
and post the results when I have something.
Reply


Messages In This Thread
RE: sound file playback (and record) - manipulating speed + pitch in realtime? - by madscijr - 02-04-2025, 11:30 PM



Users browsing this thread: 5 Guest(s)