ModPlug Central

OpenMPT => Help and Questions => Topic started by: jcmarcos on October 20, 2009, 14:42:05

Title: Keyboard recording problem
Post by: jcmarcos on October 20, 2009, 14:42:05
Hello people. I'm one of those who has rediscovered tracking, and I've just registered to this site, because I have a problem that I almost can't believe is true.
I've done a couple of searches, and haven't found anyone with my symptom, which surprises me, as I have exactly the same problem with exctly the same version 1.17.2.54 of OpenMPT, on two completely different computers.
My problem is as follows: I find it impossible to record a melody on a playing pattern with the computer's regular keyboard. Notes don't get into the pattern position I need.
Alright, it's been many years since I last used a tracker (I'm a bit embarrased to reveal which one), but I believe I can still follow a rythm. I've created a four by four kick drum pattern, then attempt to add a melody, and it's impossible, notes seem to get in the previous row that I want. The instrument I'm using is a piano, provided by a VST plugin. The only keyboard related thing I've changed is that chord detection timeout, set it to zero.
Any ideas?
Title: Keyboard recording problem
Post by: LPChip on October 20, 2009, 15:22:21
This sounds really vague. Nevertheless I still want to try to help you.

Can you make a screenshot of the pattern where you want the note to enter, edit that screenshot and draw where the cursor should be and where the notes are being entered?

Either its a simple configuration problem, or something else is going on...

I hope that a screenshot can help us finding out what causes this.
Title: Keyboard recording problem
Post by: jcmarcos on October 20, 2009, 15:48:05
Quote from: "LPChip"This sounds really vague. Nevertheless I still want to try to help you.

Thank you very much. I agree that the problem seems hard to believe.

QuoteCan you make a screenshot of the pattern where you want the note to enter, edit that screenshot and draw where the cursor should be and where the notes are being entered?

Sure, here it is:

(http://pixpin.com/show.php?i=OpenMPT-MpIE.png&s=l)

See those three pityful notes on channel 2? I swear i pressed "C-6" just in row 48, and it got in row 47. Happens to me almost always, it only gets right when I press keys delayed on purpose which, as you might guess, is almost impossible with music in mind.
Title: Keyboard recording problem
Post by: Saga Musix on October 20, 2009, 17:08:14
Actually, your C-6 is on row 49, which would suggest that there's a big latency (which would be typical of cheap midi cards).

You can try enabling "automatic delay commands" from the "General" setup screen. Thisi will automatically insert SDx commands (i.e. delays). This works best with modern tempo settings (you can enable those from the "song properities" dialog) and a rather high song speed (15 is the most efficient in this case, anything above is useless).
Title: Keyboard recording problem
Post by: LPChip on October 20, 2009, 17:09:13
Can you try setting row-spacing to 1, and see if that helps?

EDIT: Jojo's suggestion sounds more likely, but you can still give it a try.

To combat Jojo's suggestion, you could decrease the audiobuffer.

If you have DirectX, use it instead of a wave device. If you have ASIO, even better.

The lower the latency, the better response you get.

To see how the response is, press play pattern while viewing the pattern, and look for the playing row indicator. See if it makes sound when it highlights a note or not. If this is off, so will entered notes be.
Title: Keyboard recording problem
Post by: Saga Musix on October 20, 2009, 17:30:58
Row spacing doesn't work when recording live, so that option is out of question. It would be very bad if it actually worked, since it would speed up the module whenever a note is being entered.
Title: Keyboard recording problem
Post by: LPChip on October 20, 2009, 18:40:48
Quote from: "Jojo"Row spacing doesn't work when recording live, so that option is out of question. It would be very bad if it actually worked, since it would speed up the module whenever a note is being entered.

I kinda missed the part that he was recording live during playback. Your reply made me realize that and I edited my post afterwards...
Title: Keyboard recording problem
Post by: Sam_Zen on October 20, 2009, 23:19:19
When reading this topic, I started wondering : - Is he trying to record notes while the pattern is running ?

If so, it will always be implemented with some delay, no matter how fast the driver is.
I used this mode occasionally to get a 'live' touch, but, as Jojo states, with "automatic delay commands" enabled.
Title: Keyboard recording problem
Post by: Saga Musix on October 20, 2009, 23:21:47
QuoteIf so, it will always be implemented with some delay, no matter how fast the driver is.
Even with home studio equipment you can get this down to an completely unnoticable delay, though.
Title: Keyboard recording problem
Post by: Sam_Zen on October 20, 2009, 23:27:32
Of course you're right in a practical sense, but I meant it theoretically.
Even an unnnoticable delay could cause a note to land in row 30, not 29.
Title: Keyboard recording problem
Post by: Rakib on October 21, 2009, 00:14:13
Don't forget the SDx values to improve the precision.
Title: Keyboard recording problem
Post by: jcmarcos on October 21, 2009, 07:09:41
You are a group of very helpful people!

Quote from: "Jojo"Actually, your C-6 is on row 49, which would suggest that there's a big latency (which would be typical of cheap midi cards).

My mistake, I actually meant "D-6", which is the note which should go to row 48 (where the kick drum beats in channel 1). That's what shocked me, the note got recorded one row before, not after. It's the opposite to a delay.

Quote...modern tempo settings...

Yes, while desperately searching for keyboard recording options, I saw that "modern tempo" setting, and wondered what it was really. Is it adviseable to use it, as a general rule? I guess it has something to do with the way a pattern's playback speed is crafted.

QuoteThe lower the latency, the better response you get.

Of course, but I believed that the recording would be fine out of the box. Latencies do exist, but I didn't expect them to be so noticeable in modern systems.

Quotepress play pattern while viewing the pattern, and look for the playing row indicator. See if it makes sound when it highlights a note or not

Guess what, even the pattern moves a bit in a jumpy way while playing. The music plays 100% right, but it seems the pattern somehow struggles to follow it. Again, something I wouldn't expect in a modern system. And remember, I have the same symptoms on two completely different computers. As you probably guess, I don't have any fancy audio card, and just resort to the simple integrated audio functions of the computer.

Quote from: "Sam_Zen"Even an unnnoticable delay could cause a note to land in row 30, not 29

Yes, but my problem is that the note is put into the row before, not the row after.

Quote from: "Rakib"Don't forget the SDx values to improve the precision

If I understand correctly, delay is not actually my problem. Should I try these "automatic delay" option anyway?

Quote from: "LPChip"you could decrease the audiobuffer.

That sounds appropiate, I was already thinking about something like this. After all, trackers no longer bang Paula chip directly (hint for the oldest blokes here).

QuoteIf you have DirectX, use it instead of a wave device. If you have ASIO, even better.

Aha! Will do. Let me make some tests, and will be back with some news. Thankyou again to all of you!
Title: Keyboard recording problem
Post by: Saga Musix on October 21, 2009, 10:46:40
QuoteYes, while desperately searching for keyboard recording options, I saw that "modern tempo" setting, and wondered what it was really. Is it adviseable to use it, as a general rule? I guess it has something to do with the way a pattern's playback speed is crafted.
If you want to spread your modules in IT or XM format, you shouldn not use it as no other player supports it. Basically, The song's tempo will exactly match the BPM, no matter how high or low you set the speed - The "tempo" will always match the BPM. The speed on the other hand will determine how many rows will be processed in one pattern row.

QuoteGuess what, even the pattern moves a bit in a jumpy way while playing.
Yes, because you use Wave Out or DirectX with rather high latencies (>50ms). ModPlug doesn't sync really well at those high latencies. With ASIO, you can go down to 1ms latency, which will compensate also the "jumpy" patterns.

QuoteIf I understand correctly, delay is not actually my problem. Should I try these "automatic delay" option anyway?
It is. ModPlug registers your keypress while it is still in the old row (which might, for example, be due to the high latency explained above - remember, Audio playback and pattern display are processed independently!), so enabling automatic delay commands, this can be compensated - your note will still not be exactly on row 48, but at least on row 47, tick 15 - which is better than row 47, tick 0. Since there's no real quantization happening in MPT, this is the closest you can get, and manual adjustments are always necessary.
Title: Keyboard recording problem
Post by: jcmarcos on October 21, 2009, 11:16:52
Quote from: "Jojo"
QuoteI saw that "modern tempo" setting. Is it adviseable to use it, as a general rule?
If you want to spread your modules in IT or XM format, you shouldn not use it as no other player supports it. The "tempo" will always match the BPM. The speed on the other hand will determine how many rows will be processed in one pattern row.

Understood (I think... :D ).

Quote
QuoteGuess what, even the pattern moves a bit in a jumpy way while playing.
Yes, because you use Wave Out or DirectX with rather high latencies (>50ms). ModPlug doesn't sync really well at those high latencies. With ASIO, you can go down to 1ms latency, which will compensate also the "jumpy" patterns.

Well, then, I want "ASIO", which I don't know what it ls... In the sound card setup, I can choose between eight options:

1.- Auto (wave mapper)
2.- Realtek HD Audio output
3.- Modem line #1
4.- Modem headphone #1
5.- Primary audio driver
6.- Realtek HD Audio output
7.- Modem line #1
8.- Modem headphone #1

Actually, as my system is in spanish, the descriptions vary, I hope I have translated them well. As you can see, it looks as if there are, actually, four options in two flavours: The first four have a yellow speaker icon, the last four have a yellow X inside a blue circle. What's that? Also, with these later options, the option to use of secondary buffers is available.
Which one should I choose? Can I have ASIO at all with the embedded Realtek audio chip?

Here is a screenshot of my sour card options tab (why doesn't it show here, instead of just the URL?):

(http://pixpin.com/show.php?i=OpenMTP_sound_card_options-Q0Cb.png)

Quote
QuoteIf I understand correctly, delay is not actually my problem. Should I try these "automatic delay" option anyway?
It is. ModPlug registers your keypress while it is still in the old row

Aha! This explains a lot. At least, now my problem doesn't shock me that much. And why does OpenMPT need to do that...?

Quote(which might, for example, be due to the high latency explained above)

...this must be the explanation.

Quoteremember, Audio playback and pattern display are processed independently!

Of course, but it shocked me a lot that painting the song pattern was so hard to do for a moden system. By now, I guess you know on which system I tracked when I was young...

Quoteenabling automatic delay commands, this can be compensated - your note will still not be exactly on row 48, but at least on row 47, tick 15 - which is better than row 47, tick 0

Aha! Where can I set that amount of delay for every note I record?

QuoteSince there's no real quantization happening in MPT, this is the closest you can get, and manual adjustments are always necessary.

Understood. Thankyou very much Jojo![/img]
Title: Keyboard recording problem
Post by: uncloned on October 21, 2009, 12:09:12
can this help??

ASIO4ALL

http://www.asio4all.com/

ASIO driver for almost every sound card.
Title: Keyboard recording problem
Post by: Saga Musix on October 21, 2009, 12:09:50
QuoteWell, then, I want "ASIO", which I don't know what it ls... In the sound card setup, I can choose between eight options:
The speaker icon is WaveOut, the blue icon is DirectX. You would need to download ASIO4All (http://www.asio4all.com/), which is a rather good ASIO driver for cheap devices that normally can't do ASIO...

QuoteOf course, but it shocked me a lot that painting the song pattern was so hard to do for a moden system. By now, I guess you know on which system I tracked when I was young...
Doesn't depend on "old or new", it's simply the lack of quantization.

QuoteAha! Where can I set that amount of delay for every note I record?
ModPlug will determine that automatically. If you are at speed 12 and you enter a not on row "47 and a half", it would insert a SD6 command for example (as 12 / 2 = 6, duh).

QuoteOf course, but it shocked me a lot that painting the song pattern was so hard to do for a moden system. By now, I guess you know on which system I tracked when I was young...
It isn't. But you don't really have control over the playback buffers with WaveOut, and it's not much better with DirectX I think. Please don't think of ModPlug as a "modern system" or "modern software" in this case, as ModPlug's mixing engine is more than 10 years old now and there ARE ways to improve syncing and you could even go down 10ms latency with DirectX I guess, but ModPlug is simply not capable of doing that.
Title: Keyboard recording problem
Post by: LPChip on October 21, 2009, 12:10:45
OMG, you have a Buffer lenght (latency) of 75ms. Lower this value as much as possible without getting crackling noises and it should solve your problems.

If you can't get it much lower, try downloading the program Asio4All, which is a software ASIO driver that will improve your situation.

You should be able to get 30 ms to 50 ms, and with ASIO as low as 1ms to 5ms.

Btw: you can recognise the kind of sounddriver (wave/directx) by the icon in front of the name. yellow/gray speaker = wave driver, blue with yellow x = direct sound (directx) and red A is asio.
Title: Keyboard recording problem
Post by: residentgrey on October 21, 2009, 16:22:07
Is it in edit mode? I am just pointing out a possibility. I forgot to put it on and freaked out a couple times myself.
Title: Keyboard recording problem
Post by: Saga Musix on October 21, 2009, 16:30:35
Edit mode only unlocks the editing options, and doesn't affect latency, though. ::)
Title: Keyboard recording problem
Post by: bvanoudtshoorn on October 21, 2009, 22:54:07
Out of curiosity, what else do you have running on the machine while you're working? Could you also try pressing [Ctrl]+[Shift]+[Esc] and seeing what your CPU, Page File, Physical Memory, and Thread/Process counts are.
Title: Keyboard recording problem
Post by: jcmarcos on October 22, 2009, 08:24:34
Thanks uncloned and Jojo for the link to ASIO4all, a place which I've just visited, and have learnt a lot of things. The most important, that Michael Tippach is a hell of a guy: Not only he codes in assembler (!), he also is able to write both very detailed and entertaining documentation! But I won't install ASIO immediately, because of this:

Quote from: "LPChip"you have a Buffer lenght (latency) of 75ms. Lower this value as much as possible without getting crackling noises and it should solve your problems

I suspectedf that... It's the default value that OpenMPT chose. I'll lower it as much as possible. It that doesn't solve my problem, then I'll have a go at ASIO. This is also very educating:

Quote from: "Jojo"you don't really have control over the playback buffers with WaveOut, and it's not much better with DirectX I think. ModPlug's mixing engine is more than 10 years old now and there ARE ways to improve syncing and you could even go down 10ms latency with DirectX I guess, but ModPlug is simply not capable of doing that

Understood. But it really shocked me, when I was more ignorant, that a tracker wasn't able to stick the note just where I wanted it. The option to automatic insert delay commands is interesting but... I'd rather have no additional commands, but just notes going to where they should. But OpenMPT lacks quantization.

Quote from: "bvanoudtshoorn"what else do you have running on the machine while you're working?

Nopthing. Honest. Of course, the only running application is OpenMPT, accompanied by the dozens of inevitable processes that make everyday's life in the operating system (both XP and 2003). There's free RAM aplenty, and the CPU is idle 98% of time, just like in any modern computer. I don't even have a fscking antivirus (and I'm proud of it).

Thankyou very much again, guys! I'll do some tests, and tell here about them.
Title: Keyboard recording problem
Post by: Saga Musix on October 22, 2009, 10:38:02
Installing ASIO4All is always a good idea. ;) It will give you native 32bit output. I'm not sure if DX is capable of doing that. (And for those who think that you can't tell the difference - modplug's internal mixing routines work in 32bit, hence no downsampling is required.)
Title: Keyboard recording problem
Post by: jcmarcos on October 22, 2009, 12:04:42
I've just tested your suggestions, people. First, I set latency to the lowest possible (10 ms), and immediately had that horrid distorted metallic sound that you all know very well. I raised it up to 50 ms and sound was allright, but again, notes were put in the row before they should go.
Next, I enabled the option to add delay commands automatically, and that did the trick, as you knew already.

Fantastic? No! The problem now is that OpenMPT reveals that I suck!

Now, thanks to those commands, notes play exactly when I pressed them, and that is the problem: I'm unable to keep a rythm fluently.
It's like listening to a kid playing a piano, allways missong the beat, sometimes early, sometimes late. It's also very disturbing to see that notes, in many cases, still are in the row before, although the delay command makes them sound when they should... almost! I wanted them all "snapped" nicely to where they shoud be. I need quantization.

...or practice a lot more! There's really no way of having quantization in OpenMPT?
Title: Keyboard recording problem
Post by: Saga Musix on October 22, 2009, 13:46:17
QuoteI've just tested your suggestions, people. First, I set latency to the lowest possible (10 ms), and immediately had that horrid distorted metallic sound that you all know very well.
Yes, that wouldn't happen with ASIO, which even works with incredibly small buffers. The latest test version of OpenMPT can go down to 1 ms.

QuoteThere's really no way of having quantization in OpenMPT?
At the time of writing, no.
Title: Keyboard recording problem
Post by: jcmarcos on October 22, 2009, 15:28:59
Quote from: "Jojo"
QuoteThere's really no way of having quantization in OpenMPT?
At the time of writing, no.
Doh! Because it's very hard to implement, or because good musicians don't need it?
Title: Keyboard recording problem
Post by: Saga Musix on October 22, 2009, 16:14:25
I don't know if it's hard to implement; In fact, I have never tried. I guess it would be helpful to see how other programs do it, but due to the lack of Midi In on my main computer, I cannot really do much about this at the moment anyway.
Title: Keyboard recording problem
Post by: uncloned on October 22, 2009, 16:22:52
the basic idea in Sonar is to make "bins" of a particular size, like quater, eight, sixteenth, 32nd, in size and the performance note goes into the closest bin.

In addition it can apply rules to simulate swings or grooves to the quantized notes.

In the end I find quantization unsatisfactory because it robs the performance of the feel of a live performance. At that point you might as well just track it.


One technique that helps is to record at a slower tempo than intended - in that case, if you are careful, your errors will be minimized when you speed the tempo back up. I am suggesting on the order of twice as slow. And.... I hope you are playing along with something in the pattern to get the rhythm right - something that will serve as a metronome = if not you are making things much harder than they need to be.
Title: Keyboard recording problem
Post by: jcmarcos on October 23, 2009, 08:00:06
Quote from: "Jojo"
Quote from: "jcmarcos"(implement quantization)

I don't know if it's hard to implement; In fact, I have never tried

So Jojo, you are an OpenMPT developer? I didn't know, but I suspected it, by your comments about the inner workings of the program.

Quote from: "uncloned"In the end I find quantization unsatisfactory because it robs the performance of the feel of a live performance.

That's what I thought. Quantization for musicians is like ABS for racing drivers - an assistance that they should never use. But, if implemented as an option, it can help suckers like me!

QuoteOne technique that helps is to record at a slower tempo than intended - in that case, if you are careful, your errors will be minimized when you speed the tempo back up. I am suggesting on the order of twice as slow

Yes, I used that "slow motion" technique in the begining (and not only then!), simple and useful.

Thankyou all again. By now I reckon that I've bothered you all too much with my lack of experience. But I think that my problem should be added to a FAQ, because I think it will happen to any newcomer to OpenMPT.
Title: Keyboard recording problem
Post by: LPChip on October 23, 2009, 09:29:30
Quote from: "jcmarcos"
Quote from: "Jojo"
Quote from: "jcmarcos"(implement quantization)

I don't know if it's hard to implement; In fact, I have never tried

So Jojo, you are an OpenMPT developer? I didn't know, but I suspected it, by your comments about the inner workings of the program.

If you look on the left side of his post under his name, it even says that he's an OpenMPT developer X)
Title: Keyboard recording problem
Post by: residentgrey on October 25, 2009, 00:52:26
When I get my keyboard to work with MPT I'll keep all that in mind!