Author Topic: PSR-S910 sysex values for style number and tempo  (Read 8097 times)

0 Members and 1 Guest are viewing this topic.

MichaelBB

  • Guest
PSR-S910 sysex values for style number and tempo
« on: November 10, 2012, 01:29:04 PM »
Hello,

I've just joined the forum and happy to see many Yamaha experts in this forum.

I just acquired a PSR-S910 and was able to control it from SONAR. I can basically play back a series of chords from SONAR and it would produce the previously set auto-accompaniment style on the PSR.  I would like insert SYSEX message to control style and tempo changes, but I couldn't make sense of some of the parameters in the SYSEX strings.

Style Number
F0 43 73 01 51 05 00 03 04 00 00 dd dd F7 -- what should "dd dd" be? Is the 1st dd the style group and 2nd dd the style itself? How would a string for R&B GospelSwing look?

Tempo
F0 43 7E 01 t4 t3 t2 t1 F7 -- what should go in for "t4 t3 t2 t1"? I did a SYSEX dump of the tempo from the PSR, but I cannot make any sense out of the values. How do I calculate the values for mm=84 as an example?

Thanks for your assistance.

MichaelBB
 

Offline Joe H

Re: PSR-S910 sysex values for style number and tempo
« Reply #1 on: November 10, 2012, 01:43:58 PM »
Michael,

I would try selecting the style you want and then the Tempo while recording to Sonar. Then take a look at the strings.

Yamaha's data format that requires 2 bytes for data ( dd dd ) usually means there are values higher than 127. Yamaha's format is high to low, meaning the first byte represents values (multiples) of 128 and the second byte represents values of 0 to 127 written in hexidecimal values.

Example:  dd dd = 02H  30H  is a value of 304  (256 plus 48 = 304)

You should be able to set the tempo in Sonar without having to write it as a hex string.

Joe H

« Last Edit: November 10, 2012, 04:00:51 PM by Joe H »
Music is the Universal Language!

My Article: Using Multi Pads for EDM. Download Regs, Styles & MPs:  http://psrtutorial.com/music/articles/dancemusic.html
 

Offline MBedesem

Re: PSR-S910 sysex values for style number and tempo
« Reply #2 on: November 10, 2012, 02:09:32 PM »
Michael:

The style numbers are Yamaha's internal numbers. There is no factory list but I have decoded everything up to the S950. I can send it to you if you send me an email at mpb@sover.net

As Joe said, the data values for a style D1=int(StyleNumber / 128)) , D2=StyleNumber -(D1 * 128)

The three tempo values are

   totalTempo = int(60000000 / TempoEntry)
    tem1 = int(totalTempo / 16384)
    tem2 = int((totalTempo - (tem1 * 16384)) / 128)
    tem3 = totalTempo - (tem1 * 16384) - (tem2 * 128)

Note that the style tempo value  is set by

F0 43 7E 01 00 tem1 tem2 tem3 F7

My program MixMaster (see: http://www.psrtutorial.com/MB/mixMaster.html ) will allow you to enter the style number and style temp to a file with no calculations. Please see MixMasters/ListView/ Insert PSR Control Command menu item. It will do all the work for you.

It is designed expressly for the PSR/Tyros and has many functions/features not available elsewhere. And it is free....

Regards,

Michael




 

Michael P. Bedesem
mpb@vermontel.net
http://psrtutorial.com/MB/bedesem.html
Tyros 5
 

MichaelBB

  • Guest
Re: PSR-S910 sysex values for style number and tempo
« Reply #3 on: November 10, 2012, 02:50:24 PM »
Hello Michael & Joe,

Thanks for your prompt responses. Will implement your suggestions. How do I set the tempo from SONAR without a sysex message? What settings do I need to put the PSR & SONAR in? I use KBD & Style as the MIDI mode. One of my ultimate goals is to be able to have full control of the PSR from a sequencer like SONAR.

As an electronics engineer by trade, I just want to see the nuts & bolts behind the magic. Thanks for your help.

Best regards,

MichaelBB

 

Offline Joe H

Re: PSR-S910 sysex values for style number and tempo
« Reply #4 on: November 10, 2012, 04:27:07 PM »
MichaelBB,

I don't use Sonar so I can't answer the question on HOW to set tempo.  Sounds like you are wanting to use the sequencer to play a style remotely. There should be simple way to set the tempo.

But now understanding better what you want to do... just press the Tempo button on your S910 when it is in Keyboard & Style Mode and the tempo sysex string will be sent to Sonar.

Joe H
« Last Edit: November 10, 2012, 04:28:39 PM by Joe H »
Music is the Universal Language!

My Article: Using Multi Pads for EDM. Download Regs, Styles & MPs:  http://psrtutorial.com/music/articles/dancemusic.html
 

MichaelBB

  • Guest
Re: PSR-S910 sysex values for style number and tempo
« Reply #5 on: November 11, 2012, 03:52:59 PM »
Michael & Joe,

Thanks for all your help. Got everything to work now.

Best regards,

MichaelBB
 

Offline MBedesem

Re: PSR-S910 sysex values for style number and tempo
« Reply #6 on: November 11, 2012, 04:23:57 PM »
Michael:

Thank you for letting us know.

Many people who attempt to use Sonar for PSR control often get frustrated. E.G. Sonar disables their instrument on exit, the revoicing is not identical to the preset voices, you cannot easily store the PSR instrument setting (e.g like a registration does), loading a style file destroys the Casm/OTS/MusicFinder, loading a midi file destroys any step records, you can not 'play' a style or a voice, etc.

If you discover solutions/workarounds to problems, I hope you will consider sharing them with us.

Regards,

Michael


   
Michael P. Bedesem
mpb@vermontel.net
http://psrtutorial.com/MB/bedesem.html
Tyros 5
 

Islander206

  • Guest
Re: PSR-S910 sysex values for style number and tempo
« Reply #7 on: March 12, 2013, 02:19:21 PM »
Tempo
F0 43 7E 01 t4 t3 t2 t1 F7 -- what should go in for "t4 t3 t2 t1"
Hello! I have similar question about PSR-3000. Please explain it to me like I'm 4 year old how to set PSR to certain tempo using those four values.
What if I want to create a "remote control" using some software midi controller such as
http://www.mossgrabers.de/Software/ChangeIt/ChangeIt.html
or
http://mididesigner.com/
Let's say I'm making a slider capable of sending sysex strings. Do I need 4 sliders or just one? What values this slider(s) should send to PSR?   
 

Offline MBedesem

Re: PSR-S910 sysex values for style number and tempo
« Reply #8 on: March 12, 2013, 05:29:26 PM »
Islander:

While there is also a sysex tempo which controls the styles tempo (and seldom used) these numbers relate to the midi Tempo command.

Midi arguments are binary bytes that are limited to a maximum value of 128. All these calculations do is break up the tempo into 7-bit binary values to use as the three possible binary bytes.

I find it hard to believe that any user program would require you to specify each binary byte, but it so, just do the algebra using

    totalTempo = int(60000000 / TempoEntry)
    tem1 = int(totalTempo / 16384)
    tem2 = int((totalTempo - (tem1 * 16384)) / 128)
    tem3 = totalTempo - (tem1 * 16384) - (tem2 * 128)

and where TempoEntry is the tempo value that you are interested in setting (e.g. 120 beats per minute; i.e. one slider with a 5 to 500 min-max range. ). Then substitute the answer in the the other formulas as needed.

If you want to use a PSR-3000 friendly midi editor, you might want to check out MixMaster which is free at: http://www.psrtutorial.com/MB/mixMaster.html

After installation, you can open the C:\Program Files\MixMaster\Template folder to open a template for creation of a midi controller program.

Let me know at mpb@sover.net if you need additional information.

Regards,

Michael


 
« Last Edit: March 12, 2013, 05:39:31 PM by MBedesem »
Michael P. Bedesem
mpb@vermontel.net
http://psrtutorial.com/MB/bedesem.html
Tyros 5
 

Islander206

  • Guest
Re: PSR-S910 sysex values for style number and tempo
« Reply #9 on: March 13, 2013, 08:59:13 AM »
Michael, thank you for reply. Unfortunately, all this seems to be too complicated for me. I can understand the formulas and how to send a single tempo message to PSR, but can't figure out how to set Tempo from customizable software MIDI controller (and I don't mean sending MIDI clock).
Anyway, thanks for the information. I think I need some more googling to do.
 

Offline jimlaing

Re: PSR-S910 sysex values for style number and tempo
« Reply #10 on: September 12, 2015, 01:18:04 PM »
I happened across this thread when I too wanted to set TEMPO via MIDI, in my case on my Tyros 5.
Thanks to those before me for the details, formulas, etc.  After a lot of extermination, I got things to work.
I'm sharing my results via the attached EXCEL file, which as more details.

I used the syntax give to me by Yamaha for Sys-Ex for MIDI Tempo Control (F0 43 7E 01 t4 t3 t2 t1 F7  (see page 96 of Data List),
and the formulas here, then experimented 'til I seem to get it working OK.  Once I got it working, turns out it was easy to
let Excel do the math, and the Decimal-to-Hex conversions for me (via formulas I put in my Excel file, attached).

Even though I talk about Tyros5 here, it's likely this will work for many other Yamaha keyboards too!
I hope that this is helpful to someone!
-Jim
Raleigh, NC, USA / Genos / Tyros5-61 / Lucas Nana 600 / other stuff
 

Offline LaMouche

Re: PSR-S910 sysex values for style number and tempo
« Reply #11 on: December 29, 2016, 10:51:34 AM »
Hello,
I return to the subject,
I wrote a small program that generates the tempo change sysex based on the information provided in the post.
To send it to the tyros,
I am using WinMM.DLL

I open the Midi OUT


I do a MidiOutPrepareheader
I make a MidiOutLongMsg
Then a MidiOutunprepareHeader

The return values are 0, so a priori the info is sent to the tyros
My question: Is there an order to give before sending the sysex (genus Program Change or other?
I have verified my sysex by sending it by BomeSendX and it works
So a priori it is the shipment that does not work

I use the same function to send a change of style and there it works.

The lines of code used by Bedesem to send the tempo could be of great help to me (whatever the language - C, .net, Vb Delphi, Java, etc ... I can translate: I use WINDEV 20)

A big thanks in advance

Bonjour,
Je reviens sur le sujet,
J'ai ecrit un petit programme qui génere le sysex de changement de tempo d'après les infos fournies dans le post.
Pour l'envoyer au tyros ,
J'utilise WinMM.DLL

j'ouvre le Midi OUT


je fais un MidiOutPrepareheader
je fais un MidiOutLongMsg
puis un MidiOutunprepareHeader

Les valeurs de retour sont à 0, donc a priori l'info est bien envoyée au tyros
Ma question : Y a-t-il un ordre a donner avant d'envoyer le sysex (genre Program Change ou autre ?
j'ai verifié mon sysex en l'envoyant par BomeSendX et il fonctionne
donc à priori c'est l'envoi qui ne fonctionne pas

J'utilise la même fonction pour envoyer un changement de style et là ça fonctionne.

Les lignes de code utilisées par Bedesem pour l'envoi du tempo pourraient m'être d'un grand secours (quel que soit le language - C, .net, Vb Delphi,Java, etc.. je saurai traduire :  J'utilise WINDEV 20)

Un grand merci d'avance

 

Offline MBedesem

Re: PSR-S910 sysex values for style number and tempo
« Reply #12 on: December 29, 2016, 11:45:05 AM »
LaM:

Here is the Vb6 code that I used in MidiPlayer to change the tempo in Tempo View:

                xtempo = 4 * newTempoValue / beat
                tem4 = 60000000 / xtempo
                tem2 = Int(tem4 / 65536)
                tem3 = Int((tem4 - tem2 * 65536) / 256)
                tem1 = tem4 - tem2 * 65536 - tem3 * 256
                r(tempoLocation(i)) = CByte(tem2)
                r(tempoLocation(i) + 1) = CByte(tem3)
                r(tempoLocation(i) + 2) = CByte(tem1)

Regards,

Michael
Michael P. Bedesem
mpb@vermontel.net
http://psrtutorial.com/MB/bedesem.html
Tyros 5
 

Offline Jørgen

Re: PSR-S910 sysex values for style number and tempo
« Reply #13 on: December 29, 2016, 01:39:36 PM »
Hi

And a java code snippet:

      private void addTempo(int deltatime, int bpm)
      {
         try
         {
            int tempoX = 60000000 / bpm;
            int b1 = tempoX/(256*256);
            int b2 = (tempoX - b1*256*256) / 256;
            int b3 = tempoX%256;
            byte[] tempoX1 = {(byte)b1, (byte)b2, (byte)b3};
            MetaMessage tempoX2 = new MetaMessage();
            tempoX2.setMessage(81, tempoX1, 3);
            outTrack.add(new MidiEvent(tempoX2, deltatime));
         }
         catch (Exception e)
         {
            // error handling here
         }
      }

Jørgen
The Unofficial YAMAHA Keyboard Resource Site at http://www.jososoft.dk/yamaha
- since 1999
 

Offline CrzyCDN

Re: PSR-S910 sysex values for style number and tempo
« Reply #14 on: January 15, 2017, 02:54:15 AM »
My way of calculating the tempo in Visual Basic 6 by using a bit shifts ...

        TotalTempo = Int(60000000 / MyTempo)
        Tem1 = TotalTempo \ (2 ^ 14) And 127  '14 bit shift
        Tem2 = TotalTempo \ (2 ^ 7) And 127   ' 7 bit shift
        Tem3 = TotalTempo And 127

Just be sure to use the back slash divide (\=integer divide)
rather than the forward slash (/=regular divide)
I have been programming for years and did not realize there was a "\" divide.

Regards  Ted

 

Offline jimlaing

Re: PSR-S910 sysex values for style number and tempo
« Reply #15 on: January 15, 2017, 06:37:25 AM »
Hi all - interesting to see people's various ways of calculating and implementing use to Tempo Change commands etc.  My method (in the spreadsheet earlier in this thread) has worked great on my Tyros5; i now have several hundred songs on my iPad (pdf's in unrealBook app) that send "Recall Registration" then "Change Tempo" commands, and it works great!

I wouldn't buy another keyboard if it didn't support "recall registration" (via MIDI) like the Tyros does ... I rely on it so much.  I can get from calling up a song on my iPad, to playing that song, in just a couple of seconds.

-Jim
Raleigh, NC, USA / Genos / Tyros5-61 / Lucas Nana 600 / other stuff
 

Offline chikitin

Re: PSR-S910 sysex values for style number and tempo
« Reply #16 on: June 05, 2017, 04:40:34 PM »
Hello,

I've just joined the forum and happy to see many Yamaha experts in this forum.

I just acquired a PSR-S910 and was able to control it from SONAR. I can basically play back a series of chords from SONAR and it would produce the previously set auto-accompaniment style on the PSR. 
MichaelBB

Hi Michael,

Would you please let us know how you did that. I have exact same question but with Cubase. Your answer probably shed lights on my problem.