I need to synchronize FMOD to an incoming Timecode signal.
On the documentation there are numerous things related to synchronization (Sound.AddSyncPoint, System.Update …) but sadly, there are no really specific C# examples about this topic.
Can you guys at FMOD provide a best practice on how to achieve this ?
Shall I focus on doing it all myself or perhaps use some of the mentioned functions ?
Thanks a lot 😀
- aybe asked 8 years ago
I think setPitch does actually the same as setFrequency. Last time I checked the docs you can only setPitch on a channel group and the parameter is a bit different so you don’t have to calc the new frequency yourself (that’s why I you need to get the sample rate of your sound). Of course you could add your channel to a cannel group and call setPitch directly. For better quality you could change the resampling algo of fmod and set it to something different than linear.
Sorry I can’t help you with your timecode. I only have two Technics here and played with existing timecode vinyls. What you are trying to do seems to be a really interesting project!
Right, SetPitch may not do Reverse, i need to check.
Actually this project started because of Final Scratch, paid 1500€ for a buggy thing that’s been supported only a few years (no updates) and also when V2 you got out you had to pay an extra 800€ …. tired of paying €€€ …
So this project is the need to have a stand-alone DJ app,
working with any ASIO, MIDI device, turntable, just like VDJ, DJDecks, etc …
And i went to the timecode because i couldn’t reverse engineer and wanted to have a complete customisable timecode. As of today I can have 1ms resolution but it’s not really useful for now.
How did you reverese engineer the timecode ?
I am going to put that on the web soon !
I didn’t reverse engineer the timecode, I used some existing libraries. There are a few out which are quite usable. I’m really looking forward to see your timecode, sounds very interesting! I you have some questions feel free to ask, maybe I can give you some tips.
I have crawled the web and found digitalscratch, there was MsPinky too,,, they never compiled under VS2008 … thus I had to create my own.
Yes if I have some question i’ll ask you, yesterday i polished the TC, this week i will have to test it, have to implement input record + decoding + syncro first … Long task !
I guess you are talking about timecode vinyls or CDs. A while ago I played a little bit with timecode and got it working quite OK. But you must be careful with thread stuff. I’m unsure if the way I done it is OK. Maybe brett can help here.
You basically have to do this (that’s what I remember):
Create the sound you want to play.
Get the sample rate of the sound.
Start the sound paused.
Set frequency to 0.
Play the sound.
Create a custom DSP with a DSP read callback.
Create a custom sound.
Start recording your sound in a loop.
Play the sound immediately (should be OK if you use ASIO).
Add your DSP to the channel.
Process the timecode in your callback and calc speed and position.
Set the speed (frequency) and position of your playing channel accordingly.
But I don’t know if it’s safe to set these values from the callback? Maybe you need to do this in another way.
There’s one thing i wasn’t happy with that method, is setting the frequency, not every sound card may support non-standard frequencies different of 44.1Khz …
Anyway, I am going to use some of your ideas,
(Actually i spent time creating a good timecode.)
Thanks for your help !
Actually i thought using SetPitch might be better but I am going to try both,
why, because i thought of syncing the pitch to the timecode, hence using SetPitch would provide a smoother pitch change whereas using frequency might sound more robotic at last,
Actually I am concerned about the EQing, does frequency changes remove trebles ? I need to find out.
How did you create your timecode?
I created a 20 bit timecode with no ECC/CRC, with a fixed frequency sine on the other channel, the timecode is right but i still need to test it with my CDJ1000.
Please login first to submit.