ModPlug Central

OpenMPT => Help and Questions => Topic started by: AmericanDiamond on May 07, 2009, 06:00:43

Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: AmericanDiamond on May 07, 2009, 06:00:43
I'm thinking this topic has been covered before in the several years of this forum's existence, but I've searched and have not found this specific topic discussed.

I'm already familiar with the WAV sync feature and with the development of OMPT's handling decimal BPM.  However, in the time being, with full WAV samples that I use in OMPT that do not have a perfectly whole BPM, how do I easily syncronize it to the built-in tempo without using a multitude of S61, SDx and Txx commands?

I have done the above many times only to come out with imperfect sync most of the time.  I want to sync as perfectly as possible so that I may add VST effects seamlessly (internally with OMPT and with other programs that host VSTs) and play VSTis on top of the WAV file.  The built-in sync feature in the Instrument tab leaves too much room for deviation on any BPM set.

Is there a simpler, more accurate and easier way to do it in OMPT?  Is there a (freeware) external program or VST that does this with greater precision and accuracy?  This would cut down on production time significantly.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Louigi Verona on May 07, 2009, 07:25:41
Unfortunately it would be difficult anywhere. With DAWs like FLStudio synchronization can be a bit easier because you can actually see the waveform - it is visual - and if necessary, move it a bit. With MPT you do not have any visual aids.

However, even in FLStudio or whatever other DAW you would have sync problems with long wavs - eventually it'll go out of phase at least a little. Automatic sync is something I know to be available in dj software. Take Traktor studio for instance. But it requires preparation - that is, beat grids. And I haven't ever heard of anything like that being in DAWs, let alone OMPT which is best for handling samples rather than mixing and syncing wav files.

What I would suggest is to use shorter wave files. I do not know why you would want to use wave files and what are their typical lengths, but if you are using like a 3 minute wave file - you can be 100% sure that if you do not know it's tempo - it'll go out of sync somewhere.

You can try to edit the file carefully in a sound editor first - make sure to trim it, so that there is no empty space before the wave, so that the start of the sound is right in the beginning of the file.

If, however, you are using a file the tempo of which you already know (like, a wav rendition of something you yourself made in OMPT) then there should be no sync problems at all. I very often do this in FLStudio and I have 3-7 minute wave files going perfectly in sync with whatever goes on top of it if it is the same tempo.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: LPChip on May 07, 2009, 11:50:44
Maybe you can archieve what you want by loading OpenMPT as VSTi in another host.

I know there's a post somewhere on this forum with a download link to a VSTi version of OpenMPT. That way, you can have the host do all the syncing.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Saga Musix on May 07, 2009, 14:19:08
there we go...
http://forum.openmpt.org/index.php?topic=1819.0&start=15
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: AmericanDiamond on May 09, 2009, 06:44:40
Thanks LV, LPChip and Jojo.  Trimming the initial silence and painstakingly placing the start and end points of each loop in the sample editor are what I do each time already.

The OMPT VSTi plugin is a step in the right direction.  But when I used it today in VSTHost, it was unbearably choppy, with and without ASIO.  This may be because I have two HDD in use (one external USB), and this PC only has USB 1.1 capability until I can upgrade that component.  I moved all my plugins to the external drive and put the OMPT VSTi .dll file there as well and, although noticeably slower in loading time than before, the previous plugins remain unchanged by the move.

From what I heard, nevertheless, through the ghastly choppiness, it really sounded like OMPT VSTi helped the WAV keep in sync with VSTHost.  Of course I have to try it with more WAV files to see (I did get a manual good sync before using this so I hope I'm not confounding the results).

Do I need to move the OMPT VSTi .dll to the internal C drive for it to be faster?  Also, the plugin uses 1.17.02.48 and not .52 and hangs when I try to close it from the File menu, forcing me to manually end the process through Ctrl-Alt-Del.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Saga Musix on May 09, 2009, 12:51:20
Unless you have a really low amount of RAM, hard drives are never involved in playback, so this really can't be a reason for choppy playback. I'd rather bet on a (too) small buffer or too high cpu load.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: uncloned on May 09, 2009, 17:15:21
thanks - this vsti version looks to be really, really interesting

I'd like to combine sonar and openmpt - this looks like the ticket.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: LPChip on May 09, 2009, 22:32:22
Btw: I also added a link to the VSTi version on my site, and a link there is located in the software download post on this forum.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Relabsoluness on May 09, 2009, 22:49:27
Quote from: "LPChip"Btw: I also added a link to the VSTi version on my site, and a link there is located in the software download post on this forum.
I think it would be worth mentioning next to the link that the VST build is not developed, build or maintained by people involved in OpenMPT development.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: LPChip on May 10, 2009, 09:15:04
Quote from: "Relabsoluness"
Quote from: "LPChip"Btw: I also added a link to the VSTi version on my site, and a link there is located in the software download post on this forum.
I think it would be worth mentioning next to the link that the VST build is not developed, build or maintained by people involved in OpenMPT development.

It could be if you commit Pelya's code in the SVN. He gave a link to that too in his post. That way, we always have an up to date VSTi too.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: AmericanDiamond on May 12, 2009, 05:06:42
Quote from: "Jojo"Unless you have a really low amount of RAM, hard drives are never involved in playback, so this really can't be a reason for choppy playback. I'd rather bet on a (too) small buffer or too high cpu load.

Well, Jojo, I have a total of 192 MB of RAM, and my CPU load does shoot up to 100% every time I play anything in OMPT :oops:.  Can I alter my buffer size on both the traditional audio driver and ASIO?  I don't know what to do about the CPU though (if that's the case).
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Saga Musix on May 12, 2009, 11:34:34
Playback buffer size doesn't really change anything, it just may stress your CPU more or less, but another 4kb in your RAM won't really involve heavy ram/disk swapping. And really, 192mb of ram is quite nothing nowadays. i think even the oldest machines in my room have at least 256mb. ^^
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: AmericanDiamond on May 14, 2009, 02:39:45
lol, you're telling me?  Several years ago I added 128 MB to bring it up from 64.  Until I can get a completely new custom PC (dream come true), this is all I have.

But back to the original concern, are those conditions (mentioned before) why the OMPT VSTi is extremely choppy (choppier than OMPT itself)?  What are some things I can do to alleviate/eliminate that?  What are some other ways I can sync WAV to the host automatically?
Title: Revival of Topic
Post by: AmericanDiamond on September 09, 2009, 01:14:20
New season for this topic?

I've seen some DJ software that claim to beatmatch and sync WAV files and other types of files in them, like Mixxx, Jackson and Pacemaker Editor.  Can these programs (or others like it) be incorporated into OMPT?

Is there a temporary way (until floating-point tempos are formally addressed in OMPT) to deal with WAV files that have "decimal" tempos?  This is what may be causing all of the sync issues.

ADDED: I didn't want to reveal what types of WAV files I'm using, but I'm doing a video game music "remixing" project, particularly the Sonic the Hedgehog Genesis series (and other games), in which I sometimes add instruments on top of the WAV recordings or rearrange the WAV tracks.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Saga Musix on September 09, 2009, 06:26:23
And what do you mean with "incorporating" Software, please? ModPlug is not a DJ toll primarily, nor a beatmatching software.

And non-integer tempos can easily be used, for example by an alternating Txx-Scheme. For example, for a tempo of 135.5 BPM you could simply put T87 on every second row and T88 on all the others.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: bvanoudtshoorn on September 09, 2009, 07:06:08
Quote from: "Jojo"And non-integer tempos can easily be used, for example by an alternating Txx-Scheme. For example, for a tempo of 135.5 BPM you could simply put T87 on every second row and T88 on all the others.

I'm not so sure that that can be described as "easy"... :D
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Saga Musix on September 09, 2009, 17:18:29
why, what part of that idea would you consider as "complicated"? ;P
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: uncloned on September 09, 2009, 18:23:17
perhaps tedious is a better term?

unless can you get a macro of some type to put in all of those statements?
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Saga Musix on September 09, 2009, 18:36:09
Well, I wouldn't really see as tedious work - write it down once, copy paste paste paste paste paste... voilĂ , one pattern of Txx commands. Now use c&p or duplicate patterns as always to proceed. It's not like there is nothing else that has to be copied to every pattern (this doesn't apply to all genres and tunes of course), so it would be only one more channel to copy, if at all.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: AmericanDiamond on September 10, 2009, 05:09:09
Quote from: "Jojo"And what do you mean with "incorporating" Software, please? ModPlug is not a DJ toll primarily, nor a beatmatching software.
Well, I know it's not beatmatching software; that's the whole point of creating this topic.  But I meant if there was any software, like the ones I mentioned, that can work with or be used in conjunction (linked) with OMPT as far as tempo is concerned.  I have no idea how this would work, but I hope that clarifies my question.

Quote from: "Jojo"And non-integer tempos can easily be used, for example by an alternating Txx-Scheme. For example, for a tempo of 135.5 BPM you could simply put T87 on every second row and T88 on all the others.
I really don't think so, Jojo.  That might be fine for a tempo of 135.5 BPM, but what about tempos of 125.61 or 145.83?  Using the Txx scheme is what I do now, but the point is I had to find that out on my own, and for decimal tempos like the last two, it's still not a great matching.[/b]
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: psishock on September 10, 2009, 05:38:22
That precise bpm syncing is not possible in ompt (i can imagine, trying to route in some beatmaching stuff will give you further trouble, if possible at all, and honestly any dj software that does not change the pitch gives unsatisfying quality with realtime algorithms for studio purposes), you need to look for another trackers that support decimal precision. Or think outside the box, transform your samples in any favored wave editor that supports good FFT algorithms, or even better with oscillator synthesis, to your desired exact (decimal-less) bpm, and import it afterwards in ompt. This way the pitch and the waveform will be intact (altered, but unnoticeable, to be exact), and you can do anything you want with it easily, without any future headache within the tracker, like constant bpm changes, tempo hacking, tiresome copy/pastes, etc. Clean and proper job.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Saga Musix on September 10, 2009, 08:45:54
QuoteI have no idea how this would work
To be honest, neither can I.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: LPChip on September 10, 2009, 09:24:10
And if you run OpenMPT through a midi host that has a normal midi clock? Isn't it synced to a good BPM then?
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Saga Musix on September 10, 2009, 11:40:18
I don't know how pelya's VSTi worked, but modplug uses integers for tempo, so I wouldn't be sure if it would really work.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: AmericanDiamond on September 10, 2009, 19:28:24
Quote from: "psishock"...Or think outside the box, transform your samples in any favored wave editor that supports good FFT algorithms, or even better with oscillator synthesis, to your desired exact (decimal-less) bpm, and import it afterwards in ompt. This way the pitch and the waveform will be intact (altered, but unnoticeable, to be exact), and you can do anything you want with it easily, without any future headache within the tracker, like constant bpm changes, tempo hacking, tiresome copy/pastes, etc. Clean and proper job.

I tried doing this in Audacity, but I don't know what algorithm it uses for it's Change Tempo option.  I tried to finetune the tempo, export as WAV and then use MixMeister BPM to calculate the new tempo, all a hit-and-miss; it still turned out to be decimal, just another decimal number besides the original.  By the way, the WAV files I use are full recordings, not tones.  So which other wave editors use those algorithms or oscillator synthesis (what is that?  I googled it and don't see it related to BPM)?
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: psishock on September 10, 2009, 20:10:43
I'm personally using Goldwave, the timewarp tool in it can work with precise percentages on the tempo. So if the original bpm is lets say 126.23 we call that 100%, you can easy count with basic mathematics, how many percentage do you need to increase, till you get 140 example.
I've talked about full recordings too, like vocal sessions example, not tones, you can check my vocal tunes, i've matched the wav bpm very precisely to my desired one, they didn't slip, and they were much slower originally.
Oscillator synthesis is an addition to the FFT algorithms to give you more "natural" sounding after the sample transformation. Sometimes the vocals example may sound "strange" after very big bpm changes with normal FFT settings, the oscillator synthesis will help to improve the outcome (dont ask me how it exactly works, i guess it takes waveform oscillators in the picture to give you more precise outcome).
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: LPChip on September 10, 2009, 21:58:01
If you're using full-length wave files, you might want to use a different tool here. I can recommend Energy XT for this. Its a sequencer that supports wave files too. I use it next to OpenMPT.

It does however cost 45 dollar.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: psishock on September 10, 2009, 22:26:07
I'm sure that even free wave editors have FFT algorithms, that are very similar to the one i use, and helped him with the method, how should he think and act, when facing with similar problem. (as i take, he was even satisfied with the beatmatching dj software quality, so about anything would do the trip for him, as long it matches the bpm)
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Diamond on September 11, 2009, 12:04:04
I've been requesting a feature for locking samples to the songs tempo for years.
http://forum.openmpt.org/index.php?topic=2868.0&highlight=
It's perfectly doable.  MadTracker, Psycle and other trackers have had this capability for quite some time now.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: psishock on September 11, 2009, 12:33:02
yea. we have tons of requested "important" features, but we have two, more or less active developers. :P
So instead of waiting for some uncertain time after feature upgrade releases, it's a better idea to find good alternatives and solutions for our problems, and be able to go on, with producing something =)
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Saga Musix on September 11, 2009, 12:41:58
Quote from: "Diamond"It's perfectly doable.  MadTracker, Psycle and other trackers have had this capability for quite some time now.
Just because one tracker can do something, that doesn't mean that it is super-easy to add this feature to another tracker as well. Just because OpenMPT has instrument-specific tuning, that doesn't imply that it's super-easy to add it to MT2 for example.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Diamond on September 11, 2009, 12:44:18
Quote from: "psishock"yea. we have tons of requested "important" features, but we have two, more or less active developers. :P
So instead of waiting for some uncertain time after feature upgrade releases, it's a better idea to find good alternatives and solutions for our problems, and be able to go on, with producing something =)

LOL I stopped waiting a long time ago, but it's good to remind the developers every once in a while.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Diamond on September 11, 2009, 12:46:46
Quote from: "Jojo"
Quote from: "Diamond"It's perfectly doable.  MadTracker, Psycle and other trackers have had this capability for quite some time now.
Just because one tracker can do something, that doesn't mean that it is super-easy to add this feature to another tracker as well. Just because OpenMPT has instrument-specific tuning, that doesn't imply that it's super-easy to add it to MT2 for example.

I don't believe that I stated or implied anything about the difficulty level of adding such a feature.  I simply stated that it was doable.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: psishock on September 11, 2009, 13:04:19
Quotebut it's good to remind the developers every once in a while.
nah, don't do that, it's one of the most annoying thing to do for them (just as saying "its easy to do/implement"). :P
they are fully aware of the requested bug and feature stuff, they are luring on those parts of the forums, most of the time. =)
Nagging them makes angry developers, instead of more producing ones. :P

Especially Jojo is very aggressive, he feeds on raw meat, from time to time.  :shock:
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: uncloned on September 11, 2009, 13:13:22
Quote from: psishock
Quote

Especially Jojo is very aggressive, he feeds on raw meat, from time to time.  :shock:


That's why he's been taking bites out of people - Someone should feed him more often   :P
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Diamond on September 11, 2009, 13:22:19
Quote from: "psishock"
Quotebut it's good to remind the developers every once in a while.
nah, don't do that, it's one of the most annoying thing to do for them (just as saying "its easy to do/implement").

Sorry, it's in the nature of users to request improvements and of course we all have our priorities.  As long as you don't get carried away, there's nothing wrong with reminding the developers once in a while.  A friendly reminder every couple of years is certainly not nagging.  And I said nothing about it being easy to do or implement.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Saga Musix on September 11, 2009, 13:30:32
Quote from: "Diamond"I don't believe that I stated or implied anything about the difficulty level of adding such a feature.  I simply stated that it was doable.
I did not say that. It was merely a general hint, because I hear the typical "Tracker x has that, why does OpenMPT not have it?" thing often enough.
Title: On EASILY synchronizing WAV samples to OMPT tempo/MIDI Clock
Post by: Rakib on September 11, 2009, 15:40:32
Pcycle is open source, so maybe other than jojo could look at the source and see how it is done there. But again there are other features I want to see coming to mpt before this one.