Jump to content

A8 MMS - Measure Counter


I have yet to input music into the MIDI MUSIC SYSTEM (MMS) software and have it correct the first play through.  I can hear the error as it is played but MMS gives no indication of  which measure it might be in.  One solution requires an Arduino, MIDI shield with a THRU port, and numeric display.

 

The plan was to program a MMS voice to out put a MIDI command once per measure on an unused channel and have the Arduino count the number of times the command was received. 

 

I really didn't put two much effort into figuring out the best way to accomplish this.   It worked with what parts were avalible with as little time as possible.  It was one of those projects not worthy of documentation until it took me longer to find my notes then to rebuild and use. Now I'll at least have this for reference.

 

-------------------------------------------------------------------------------------------------------------

On the ATARI

 

The MMS software was easy to program.  A loop was made to repeat  one measure with a couple of SOUNDn commands  and channel 16 to output a 0 or 1 to toggle the input to the arduino.

 

The below example is in 4/4 time. For this piece of music, VOICE 20 was programed with the following information. Be sure to {A}SSIGN VOICES from the main menu to the your MIDI channel of choice.

 

Repeat X86

Sound #1

RS

Sound #0

RE.

RH.

EndR

 

The Sound #n command is a 2 byte command.  Simple and fast.  The Arduino will receive the command and will turn on a digital pin when 1 and off when 0.   The REST is a 1/16 beat and gives the display enough time to register a change in pin status.  The rest of the Rests make up the 4 beat measure.

 

--------------------------------------------------------------------

The Arduino

 

prototype.thumb.JPG.c233acd7b5f854fd4c5d549d842c8710.JPG

First prototype

 

 In this case the Arduino is an interface between MMS and a digital counter.  Turn on pin three and the optocoupler grounds the counter plus lead. Turn off pin 3 and counter is incremented. A push button is also provided to reset the counter. The LED on pin 2 is an indicator that the Arduino is receiving the measure pulse.

 

 

/*  MMS Measure Counter 

 *  

 *   Working with MIDI MUSIC SYSTEM it is often hard to know which

 *   measure you are listening to while editing a song. An Arduino can be

 *   programed to accept MIDI data on Channel 16 that will cause a counter

 *   increment.  A Voice channel in the MMS can be programed to output

 *   a signal to reset or increment the display of a $1.00 step meter. 

 *  

 *   This program will look for a midi program change command  on channel

 *   16 (207). Then read data

 *      0 for off

 *      1 for count

 *      

 */

int ledPin = 2;

int countPin = 3;

 

byte midiCommand = 0;

byte midiData = 0;

byte programChange =  207; //number representing channel and Command

                           // 192(program change)+15(channel 16)

                          

void setup() {

  pinMode(ledPin,OUTPUT);

  pinMode(countPin,OUTPUT);

  digitalWrite(ledPin,LOW);

  digitalWrite(countPin,LOW);

  Serial.begin(31250);

}

 

void loop() {

  while(Serial.available()<1){}//wait for data

  midiCommand = Serial.read();

  if (midiCommand == programChange){   // Note On - Channel

    while(Serial.available()<1){}//wait for data

    midiData = Serial.read();

 

    switch (midiData) {

    case 0:  // Turn off pins

      digitalWrite(ledPin,LOW);

      digitalWrite(countPin,LOW);

      break;

    case 1: // increment counter

      digitalWrite(countPin,HIGH);

      digitalWrite(ledPin,HIGH);

      break;

  }

 }

}

 

------------------------------------------------------------------------------------------

The counter and display unit

 

The counter/display is left-over from a challenge to find something in the dollar store to hack.  It turned out to be a step meter.  The step meter has two swiches.  A sensor switch that is a weighted spring that makes contact as your hips sway and a reset button. 

 

If you have a cheep step meter,  you can carefully open the case. The case holds the internal parts together and will need to reassemble it.  Solder wires to replace switches with external switches and reassemble.  Now you should be able to short the wires to see which does what.  One pair resets the counter and the other increments the counter.

 

shield.thumb.jpg.f1565d5d4697a2f3e020f19ddcf942e0.jpg

 

Build the circuit with the Arduino, modified step meter, reset button, 2-330ohm resisters, LED and optocoupler IC. I put it on a prototype board cause I knew it would get used again (and again).

 

2000898543_shieldPrototype.thumb.JPG.64677778c3afbe5c9ae6325e72730069.JPG

 

The only reason you need the circuit is for the use of the step meter.  You may be better off using another display method.

 

---------------------------------------------------------------------------------------------------------------------------------------

 

2099120188_Hookedup.thumb.JPG.bb7fbe08e9fd018a17b9128d57474809.JPG

 

Connect your Atari-MIDI interface MIDI Output to the MIDI Input on the Arduino shield and the Arduino Shield THRU to your synth MIDI Input. Press the reset button and start the music.  As you listen to the music jot down the measure numbers when you hear something unexpected.  Now you have a good starting point for searching out the cause of the discord.

 

Find your own method for counting measures. What ever you come up with will probably be better then  my old PLAY-MEASURE-1,10 and  PLAY-MEASURE-10,20 and etc. (to the end of time).

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...