Piano World Home Page

Question "USB to HOST" feature

Posted By: andy79_ro

Question "USB to HOST" feature - 05/26/09 07:29 AM

Hello to you all,

Most Yamaha CLP DPs have the "USB to HOST" connectivity. Can this be used as a substitute for the MIDI out? Can one play virtual instrumetns on the PC through the USB to HOST or it is used only for midi file transfer after recording them on the DPs memory ?

Thank you.
Posted By: tbaroghel

Re: Question "USB to HOST" feature - 05/26/09 08:50 AM

Hi Andy,

USB (to host) is indeed a substitute for (or addition to) the MIDI IN & MIDI OUT, aloowing you to use virtual instruments without having to buy a dedicated MIDI adapter for your PC. Other things you can do thru it is depending on the piano brand/model and the implementation of MIDI in the instrument (some will use 'USB to device' for any other task).

Regards,

Thierry
Posted By: andy79_ro

Re: Question "USB to HOST" feature - 05/26/09 09:03 AM

Thank you Thierry. Did you use this feature, are there latency problems with the USB?
Posted By: tbaroghel

Re: Question "USB to HOST" feature - 05/26/09 02:28 PM

Andy,

I did use the USB link and did not notice any latency issue over similar 'pure MIDI' link. (To be honest, you would probably struggle to find any new PC hardware with a MIDI interface which is not based on USB ... ) You can get a good idea for the lack of latency using the 'USB to Host' link TO AND FROM the PC with programs like 'One Man Band' where MIDI flow is captured, modified and injected back into your DP all in real time. (You can get a demo version for free of this program which creates a Yamaha-style auto-accompaniment)


In any case, USB is a much faster technology than 'old' MIDI so I imagine latency issues, if any, will come with the AUDIO part, using the virtual instruments.

Regards from Paris,

Thierry
Posted By: Budimir Grom

Re: Question "USB to HOST" feature - 10/04/09 04:08 AM

You need a good sound card (ASIO 2, 192 kHz sample rate, stereo) to overcome latency issues. But there’s more. To get the best of your instrument, you need high quality sound. Based on many reviews I’ve been reading, I intend to buy ASUS Xonar Essence STX.
Posted By: ChrisA

Re: Question "USB to HOST" feature - 10/04/09 05:12 AM

Originally Posted by Nikola Tulimirovic
You need a good sound card (ASIO 2, 192 kHz sample rate, stereo) to overcome latency issues. But there’s more. To get the best of your instrument, you need high quality sound. Based on many reviews I’ve been reading, I intend to buy ASUS Xonar Essence STX.


A high sample rate will not help latency. If anything it makes to worse. You do want a good audio interface, but You can do better than that card for half the price

You have to define you needs before you buy and audio interface. For example will you ever be recording audio from a mic or instrument? How many trans at once. What about monitoring? Speakers" headphones" how many of each?

One thing I don;r lke about cards that plug into a PC is that they can't have dials and controls or very many larger connectors.
Posted By: Budimir Grom

Re: Question "USB to HOST" feature - 10/04/09 05:35 AM

Chris, what makes you think increasing sample rate also increases latency?
Posted By: DragonPianoPlayer

Re: Question "USB to HOST" feature - 10/04/09 09:35 AM

Nikola,

Increasing sample rate increases the number of data points that the waveform needs to be generated for.
Posted By: Budimir Grom

Re: Question "USB to HOST" feature - 10/04/09 11:03 AM

I am tired. Maybe I’m missing something...

Widespread approximation for playing:
Code
latency = number of samples / sample rate


So, if the number of samples doesn’t change, increasing sample rate decreases latency. Buffer is of the same size, but it receives and sends data faster.

If we aren’t considering CPU load, I must be missing something.
Posted By: daro

Re: Question "USB to HOST" feature - 10/04/09 07:23 PM

Originally Posted by DragonPianoPlayer
Nikola,

Increasing sample rate increases the number of data points that the waveform needs to be generated for.


Increasing sample rate only increases the frequency that can be represented. The waveform for an A440 sampled at 1K is absolutely identical to an A440 sampled at 192K.

Originally Posted by Nikola Tulimirovic
I am tired. Maybe I’m missing something...

Widespread approximation for playing:
Code
latency = number of samples / sample rate


So, if the number of samples doesn’t change, increasing sample rate decreases latency. Buffer is of the same size, but it receives and sends data faster.

If we aren’t considering CPU load, I must be missing something.


Except, for practical purposes, I think you have to consider CPU load as well as any number of other factors, including the interface, driver quality etc. that may require you to increase your buffer size when using a high sample rate to avoid artifacts.

In any case, for simply recording audio, 192K is way overkill, unless it's for a trio of porpoise, field mouse and fruit bat. Also, the engineering of such converters requires a compromise between speed and accuracy, so unless the 192K converter is extremely expensive, it may very well be introducing some distortion just by itself that simply wouldn't occur at a lower rate.
Posted By: DragonPianoPlayer

Re: Question "USB to HOST" feature - 10/04/09 09:37 PM

OK, let's be sure we are talking about the same thing. This thread concerns MIDI signals via a USB to Host connection. MIDI by itself has little to no latency. Latency appears in this scenario when you have to deal with (for example) a VSTi, audio driver, and the appropriate output buffers.

I'm thinking that the VSTi and audio drivers are the biggest sources of latency in this scenario. I would agree that the latency due to the buffers scales inversely with the sample frequency. You can also minimize the latency of the audio driver by using an ASIO driver (on Windows, because this works directly with the hardware and does not need to program through multiple interface layers, if I understand the importance of ASIO drivers). Doesn't the DAW need to move or create twice the amount of data at 44k as at 22k? Aren't the sample sizes on the disks or in RAM twice as big? Or am I missing something here? I'm lookin at this from the viewpoint of someone with a degree in physics.

Rich
Posted By: daro

Re: Question "USB to HOST" feature - 10/04/09 11:36 PM

Originally Posted by DragonPianoPlayer
OK, let's be sure we are talking about the same thing. This thread concerns MIDI signals via a USB to Host connection. MIDI by itself has little to no latency. Latency appears in this scenario when you have to deal with (for example) a VSTi, audio driver, and the appropriate output buffers.

I'm thinking that the VSTi and audio drivers are the biggest sources of latency in this scenario. I would agree that the latency due to the buffers scales inversely with the sample frequency. You can also minimize the latency of the audio driver by using an ASIO driver (on Windows, because this works directly with the hardware and does not need to program through multiple interface layers, if I understand the importance of ASIO drivers). Doesn't the DAW need to move or create twice the amount of data at 44k as at 22k? Aren't the sample sizes on the disks or in RAM twice as big? Or am I missing something here? I'm lookin at this from the viewpoint of someone with a degree in physics.

Rich


I agree with what you're saying here; the nit I was picking was due to your perhaps inelegant phrasing regarding the generation of a wave. In my example, an A440 using a 192K sampling rate does create 4 times as much data as sampling it at 48K, but the output wave is going to be identical since it only needed to be sampled at over twice the frequency to recreate it. Therefore, using 192K would be an unnecessary waste of resources that might be better used to help compensate for latency issues that could arise due to other components.
Posted By: Budimir Grom

Re: Question "USB to HOST" feature - 10/05/09 12:14 AM

Originally Posted by daro
Increasing sample rate only increases the frequency that can be represented. The waveform for an A440 sampled at 1K is absolutely identical to an A440 sampled at 192K.


Having a higher frequency leaves you with more time slots to put sound to, therefore allowing you to push sound through your computer a little bit faster. Not only that, but that’s the point here.

Originally Posted by daro
Except, for practical purposes, I think you have to consider CPU load as well as any number of other factors, including the interface, driver quality etc. that may require you to increase your buffer size when using a high sample rate to avoid artifacts.


I know. At this point, let’s say we are to use supercomputers for the purpose. DragonPianoPlayer explained the driver part. I’ll give an example for CPU, RAM and the rest at the end of this post.

Originally Posted by daro
In any case, for simply recording audio, 192K is way overkill, unless it's for a trio of porpoise, field mouse and fruit bat.


I somewhat agree. Depends on what you do and I wouldn’t use 192kHz for recording. I am not considering latency jitter here, just the average keystroke-pleasure time, but it can reduce problems with latency jitter, too. It’s important for playing because we don’t want to wait for responses after hitting keys. I like to hear sound response immediately (<5ms).

Originally Posted by daro
Also, the engineering of such converters requires a compromise between speed and accuracy, so unless the 192K converter is extremely expensive, it may very well be introducing some distortion just by itself that simply wouldn't occur at a lower rate.


I believe ASUS Xonar Essence STX can help a lot. Also, you may go with 96kHz, if you hear distortion while playing at 192kHz.

Originally Posted by DragonPianoPlayer
OK, let's be sure we are talking about the same thing. This thread concerns MIDI signals via a USB to Host connection. MIDI by itself has little to no latency. Latency appears in this scenario when you have to deal with (for example) a VSTi, audio driver, and the appropriate output buffers.


Yes. MIDI is limited by the rest of the system, and that’s USB in this case. No creature on Earth can percept these latencies. smile

Originally Posted by DragonPianoPlayer
I'm thinking that the VSTi and audio drivers are the biggest sources of latency in this scenario. I would agree that the latency due to the buffers scales inversely with the sample frequency. You can also minimize the latency of the audio driver by using an ASIO driver (on Windows, because this works directly with the hardware and does not need to program through multiple interface layers, if I understand the importance of ASIO drivers).


Yes, in case we’re dealing with an old PC, but I guess whoever wants to do stuff we’re discussing here will buy a good enough computer in a year or two. By good enough I mean capable of making latency produced by VST host and VSTi close to zero. And aving ASIO, we’re basically left only with buffer latency.

Originally Posted by DragonPianoPlayer
Doesn't the DAW need to move or create twice the amount of data at 44k as at 22k? Aren't the sample sizes on the disks or in RAM twice as big? Or am I missing something here? I'm lookin at this from the viewpoint of someone with a degree in physics.


Right. You’re not missing anything. I slept well, so neither am I. smile

A friend of mine has a studio not far from my apartment. For this sort of games, he uses Phenom II 550, 4 GB DDR3 1333MHz. I’m not sure about HDD. Interface is M-Audio, both controller and audio processing unit. Again, not sure about models. I tried it and it works.
Posted By: daro

Re: Question "USB to HOST" feature - 10/05/09 05:54 PM

Originally Posted by Nikola Tulimirovic
Originally Posted by daro
Increasing sample rate only increases the frequency that can be represented. The waveform for an A440 sampled at 1K is absolutely identical to an A440 sampled at 192K.


Having a higher frequency leaves you with more time slots to put sound to, therefore allowing you to push sound through your computer a little bit faster. Not only that, but that’s the point here.


I'm sorry but this is completely wrong. "Sound" is not pushed through the system, mathematical representations are, and the sampling rate only has meaning with the respect to the particular wave being sampled. Again, an A440 is represented in its entirety by sampling at 1K. There is absolutely no additional information in an A440 sampled at 192K that isn't there at 1K, so all the extra data beyond that is simply a zero, not a place that other sounds can be stuffed into.

Originally Posted by Nikola Tulimirovic
Originally Posted by daro
Also, the engineering of such converters requires a compromise between speed and accuracy, so unless the 192K converter is extremely expensive, it may very well be introducing some distortion just by itself that simply wouldn't occur at a lower rate.


I believe ASUS Xonar Essence STX can help a lot. Also, you may go with 96kHz, if you hear distortion while playing at 192kHz.


I would respectfully suggest that you check out Dan Lavry's website. He's the designer of some of the highest-end converters in the world, and he's written several white papers that address this issue far more cogently than I can, as well as including all the relevant math if you're so inclined.
Posted By: Budimir Grom

Re: Question "USB to HOST" feature - 10/05/09 10:14 PM

You’re probably right... Sound doesn’t go through the system. Mathematical representations do...

Now, let’s get back to the point. Again, it’s not recording. It’s playing. When I hit the key, I want my mathematical representation to travel as fast as possible (<5ms), so that I do not notice any delay. Dan says 44kHz is more than enough and 192 kHz makes distortion? OK. Let's see what happens... In order to get buffer latency under 5ms, we have to decrease buffer size under 220 samples. Doing that, we often end up with clicks and pops, which are a lot worse than beforementioned distortion. So, what do we do? We increase sample rate to 96kHz and buffer size to 512 samples, possibly removing all the clicks, because CPU peaks don’t double. If that doesn’t work, we double to 192/1024. CPU peaks, again, don’t double. If that doesn’t work, we better go shopping.
Posted By: megabyzus

Re: Question "USB to HOST" feature - 11/26/12 09:24 PM

Hi, can someone help me with this question about the USB to HOST OUT on my future keyboard before I purchase it?:

If I connect the keyboard to an iPad(or computer) with GarageBand(or similar software) and select a type of loop/sound on GarageBand, say a drum, once I play a note on the kbd, will I hear the drum on my kbd speakers or only on the iPad (or computer)? Note the kbd has an USB to Host output.


Thanks, in advance!

Mo
© 2019 Piano World Piano & Digital Piano Forums