Author Topic: Playing MIDI  (Read 326 times)

Offline AstRii

  • High Voltage Enthusiast
  • *
  • Posts: 22
  • Karma: +0/-0
  • Czech Technical University in Prague
    • View Profile
Playing MIDI
« on: December 31, 2019, 02:22:34 PM »
Hello,
I'm currently building my first DRSSTC and there are only few things remaining. And the thing i'm struggling with is the interrupter. I wonder how do you guys play MIDI files? I've seen interrupters which decode MIDI files in real time and create appropriate fixed on time square wave. Since now i've been using Arduino UNO as an Interrupter and the way i'm recreating songs on my DRSSTC is i think rather silly and inefficient. I'm using software AnthemScore to get all the notes from a song and then i manually write them into a text file (it's frequency and duration) which i'm then capable of playing. It takes me hours to recreate a single song. So i wonder, how do you play MIDI files on your DRSSTCs?
Thank you and happy new year!!:)
« Last Edit: December 31, 2019, 02:31:37 PM by AstRii »

Offline davekni

  • High Voltage Technician
  • ***
  • Posts: 156
  • Karma: +5/-0
  • Physicist, engineer (electronic), and hobbiest
    • View Profile
Re: Playing MIDI
« Reply #1 on: December 31, 2019, 08:31:32 PM »
Others will reply with what's common - I think USB-to-MIDI, then to a real-time MIDI interrupter.

I'm working on a different path, learning the MIDI file format and writing an interpreter.  All the note frequency and timing is in the file, along with other things that can be ignored (skipped over).  I'll then convert the notes into an interrupter pulse waveform in MP3 format, record on a small MP3 player, and play it during performance.  This latter part is already running with a kludge input portion.

BTW, my existing kludge is to edit a MIDI file down to just melody (single note at a time), play it with a sine-wave synthesizer voice, record as .wav file, run custom code to detect rising zero-crossings and convert to pulses, then record as MP3.
David Knierim

Offline AstRii

  • High Voltage Enthusiast
  • *
  • Posts: 22
  • Karma: +0/-0
  • Czech Technical University in Prague
    • View Profile
Re: Playing MIDI
« Reply #2 on: January 01, 2020, 03:00:31 PM »
The real time MIDI to square wave interrupter is what i'm interested in. How is that achieved? Decoding the MIDI with python/C or something? Or is it just some hardware stuff?

Offline futurist

  • Global Moderator
  • High Voltage Technician
  • *****
  • Posts: 124
  • Karma: +1/-0
    • View Profile
Re: Playing MIDI
« Reply #3 on: January 01, 2020, 04:55:32 PM »
You can download onetesla interrupter code from their website and use it with arduino uno/nano. MIDI to USB adapter isn't needed, if you adjust baud rate internal arduino ftdi chip can be used
http://onetesla.com/oneTesla_interrupter_firmware.zip

Try searching the forum, many people me including use this interrupter


Offline AstRii

  • High Voltage Enthusiast
  • *
  • Posts: 22
  • Karma: +0/-0
  • Czech Technical University in Prague
    • View Profile
Re: Playing MIDI
« Reply #4 on: January 01, 2020, 05:16:53 PM »
Is there any documentation for this code? My coding skills aren't any high level, so i don't fully understand the code and how to use it. Do i only need arduino for this? How do i send the MIDI data to the arduino? How do i change maximum on time? Which arduino pin is outputting the square wave to drive the optical transmitter? Sorry for those dumb questions:D
« Last Edit: January 01, 2020, 07:18:04 PM by AstRii »

Offline Mads Barnkob

  • Administrator
  • High Voltage Expert
  • *****
  • Posts: 1236
  • Karma: +17/-0
  • Denmark
    • View Profile
    • Kaizer Power Electronics
Re: Playing MIDI
« Reply #5 on: January 01, 2020, 08:02:42 PM »
I use a laptop with some kind of MIDI editor, doesn't matter which.

I got a collection of MIDI files edited to suit being played on a DRSSTC, you can find some here: https://highvoltageforum.net/index.php?topic=118.0

I use a cheap USB-MIDI interface from ebay to connect laptop to MIDI interrupter.

I gave up on spending time making my own interrupter, so I bought one from Loneoceans: https://www.loneoceans.com/labs/sales/midi2/ There is also a very good description on how it works.
http://www.kaizerpowerelectronics.dk - Tesla coils, high voltage, pulse power, audio and general electronics

Offline futurist

  • Global Moderator
  • High Voltage Technician
  • *****
  • Posts: 124
  • Karma: +1/-0
    • View Profile
Re: Playing MIDI
« Reply #6 on: January 02, 2020, 12:22:32 AM »
Is there any documentation for this code? My coding skills aren't any high level, so i don't fully understand the code and how to use it. Do i only need arduino for this? How do i send the MIDI data to the arduino? How do i change maximum on time? Which arduino pin is outputting the square wave to drive the optical transmitter? Sorry for those dumb questions:D

It's actually very simple

You need to adjust baud rate to 38400 in midi.h line 56
on-time can be adjusted by changing LOOKUP_TABLE_SCALE prescaler in constants.h line 14, this is multiplied by on_times array, so for LOOKUP_TABLE_SCALE = 3, max. on-time would be 99 us

Pins, from schematics http://onetesla.com/media/wysiwyg/onetesla_interrupter_schematic.png

frequency pot is ADC0
on-time pot is ADC1
fixed/midi mode pin is digital 1
output pin is digital 0

On windows use this as Midi-serial converter - remember to set baud to 38400
http://projectgus.github.io/hairless-midiserial/

and this for the loopback interface
http://www.tobias-erichsen.de/software/loopmidi.html

loneoceans interrupter are actually two onetesla interrupters programmed to listen to different midi channel, but making your own is a lot more fun, and you learn something :D

Offline AstRii

  • High Voltage Enthusiast
  • *
  • Posts: 22
  • Karma: +0/-0
  • Czech Technical University in Prague
    • View Profile
Re: Playing MIDI
« Reply #7 on: January 02, 2020, 03:18:29 AM »
Ok thank you, that sounds pretty straight-forward. Though is there a need for the optocoupler between MIDI pin 4 and Arduino RX? What is it's purpose?

Offline Mads Barnkob

  • Administrator
  • High Voltage Expert
  • *****
  • Posts: 1236
  • Karma: +17/-0
  • Denmark
    • View Profile
    • Kaizer Power Electronics
Re: Playing MIDI
« Reply #8 on: January 02, 2020, 09:27:45 AM »
Ok thank you, that sounds pretty straight-forward. Though is there a need for the optocoupler between MIDI pin 4 and Arduino RX? What is it's purpose?

There is a lot of EMI around a Tesla coil. The MIDI and USB interfaces are easily disturbed by this and all the cables running back and forth are good at picking up some noise aswell. It is always a good idea to add isolation between interfaces when we deal with Tesla coils :)
http://www.kaizerpowerelectronics.dk - Tesla coils, high voltage, pulse power, audio and general electronics

Offline futurist

  • Global Moderator
  • High Voltage Technician
  • *****
  • Posts: 124
  • Karma: +1/-0
    • View Profile
Re: Playing MIDI
« Reply #9 on: January 02, 2020, 11:01:33 AM »
In your case you won't need optocoupler because you won't use USB to MIDI adapter but internal USB to serial converter used for programming arduino

High Voltage Forum

Re: Playing MIDI
« Reply #9 on: January 02, 2020, 11:01:33 AM »

 


* Recent Topics and Posts

post Re: GM tube hv transformer
[Detection, Counting and Measurements]
futurist
Today at 11:01:24 AM
post Re: CT performance investigations (Pearson and DIY)
[Dual Resonant Solid State Tesla coils (DRSSTC)]
T3sl4co1l
Today at 06:44:21 AM
post Re: Mazilli ZVS Driver Modification Problems
[Transformer (Ferrite Core)]
T3sl4co1l
Today at 06:37:47 AM
post Re: Mazilli ZVS Driver Modification Problems
[Transformer (Ferrite Core)]
Andrew321
Today at 02:22:09 AM
post Re: GM tube hv transformer
[Detection, Counting and Measurements]
haversin
Today at 01:15:21 AM
post Re: GM tube hv transformer
[Detection, Counting and Measurements]
klugesmith
January 24, 2020, 10:53:42 PM
post Re: WTB [EU]: Cellular Sector Antenna
[Sell / Buy / Trade]
Da_Stier
January 24, 2020, 10:52:48 PM
post Re: GM tube hv transformer
[Detection, Counting and Measurements]
haversin
January 24, 2020, 10:29:14 PM
post Re: Problems with my first DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
bozidar
January 24, 2020, 08:16:12 PM
post GM tube hv transformer
[Detection, Counting and Measurements]
AlexanderHun
January 24, 2020, 06:24:25 PM
post Re: DIY SMAW welder (stick welding)
[Electronic Circuits]
rikkitikkitavi
January 24, 2020, 05:17:01 PM
post Re: My 833A VTTC
[Vacuum Tube Tesla Coils (VTTC)]
MRMILSTAR
January 24, 2020, 04:37:25 PM
post Re: simple confusion about UD2.7c LEDs
[Dual Resonant Solid State Tesla coils (DRSSTC)]
justin66
January 24, 2020, 04:15:41 PM
post Re: My 833A VTTC
[Vacuum Tube Tesla Coils (VTTC)]
Mads Barnkob
January 24, 2020, 01:15:46 PM
post Re: simple confusion about UD2.7c LEDs
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Mads Barnkob
January 24, 2020, 01:10:38 PM
post Re: simple confusion about UD2.7c LEDs
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
January 24, 2020, 12:39:01 PM
post Re: simple confusion about UD2.7c LEDs
[Dual Resonant Solid State Tesla coils (DRSSTC)]
justin66
January 24, 2020, 11:43:08 AM
post Re: My 833A VTTC
[Vacuum Tube Tesla Coils (VTTC)]
kilovolt
January 24, 2020, 11:10:55 AM
post Re: DIY SMAW welder (stick welding)
[Electronic Circuits]
kamelryttarn
January 24, 2020, 10:11:51 AM
post Re: Doorknob vs Ceramic Disk
[Voltage Multipliers]
kilovolt
January 24, 2020, 09:03:52 AM
post Re: CT performance investigations (Pearson and DIY)
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
January 23, 2020, 11:50:22 PM
post Re: simple confusion about UD2.7c LEDs
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Mads Barnkob
January 23, 2020, 11:42:56 PM
post Re: WTB [EU]: Cellular Sector Antenna
[Sell / Buy / Trade]
Mads Barnkob
January 23, 2020, 11:35:07 PM
post Re: simple confusion about UD2.7c LEDs
[Dual Resonant Solid State Tesla coils (DRSSTC)]
justin66
January 23, 2020, 11:15:12 PM
post Re: Doorknob vs Ceramic Disk
[Voltage Multipliers]
MRMILSTAR
January 23, 2020, 10:42:22 PM
post Re: CT performance investigations (Pearson and DIY)
[Dual Resonant Solid State Tesla coils (DRSSTC)]
T3sl4co1l
January 23, 2020, 10:03:17 PM
post Re: Doorknob vs Ceramic Disk
[Voltage Multipliers]
kilovolt
January 23, 2020, 09:55:05 PM
post Re: Doorknob vs Ceramic Disk
[Voltage Multipliers]
MRMILSTAR
January 23, 2020, 08:39:10 PM
post Re: Universal bus precharge & fan speed controller
[Dual Resonant Solid State Tesla coils (DRSSTC)]
acobaugh
January 23, 2020, 08:37:43 PM
post Re: simple confusion about UD2.7c LEDs
[Dual Resonant Solid State Tesla coils (DRSSTC)]
acobaugh
January 23, 2020, 08:16:02 PM
post simple confusion about UD2.7c LEDs
[Dual Resonant Solid State Tesla coils (DRSSTC)]
justin66
January 23, 2020, 07:48:39 PM
post Re: Bipolar high voltage multiplier project - more than 70cm hot arc discharge
[Voltage Multipliers]
kilovolt
January 23, 2020, 05:07:46 PM
post Re: My 240kv voltage multiplier
[Voltage Multipliers]
kilovolt
January 23, 2020, 05:05:40 PM
post Re: Doorknob vs Ceramic Disk
[Voltage Multipliers]
kilovolt
January 23, 2020, 05:01:27 PM
post WTB [EU]: Cellular Sector Antenna
[Sell / Buy / Trade]
Da_Stier
January 23, 2020, 04:34:34 PM
post Re: My X-Ray Machine
[X-ray]
Agent Smith
January 23, 2020, 03:47:06 PM
post Re: DIY SMAW welder (stick welding)
[Electronic Circuits]
rikkitikkitavi
January 23, 2020, 02:24:07 PM
post Re: DIY SMAW welder (stick welding)
[Electronic Circuits]
kamelryttarn
January 23, 2020, 01:29:01 PM
post Re: DIY SMAW welder (stick welding)
[Electronic Circuits]
rikkitikkitavi
January 23, 2020, 12:45:40 PM
post Re: DIY SMAW welder (stick welding)
[Electronic Circuits]
kamelryttarn
January 23, 2020, 11:38:18 AM
post Re: DIY SMAW welder (stick welding)
[Electronic Circuits]
rikkitikkitavi
January 23, 2020, 10:43:36 AM
post DIY SMAW welder (stick welding)
[Electronic Circuits]
kamelryttarn
January 23, 2020, 08:32:56 AM
post Re: Doorknob vs Ceramic Disk
[Voltage Multipliers]
davekni
January 23, 2020, 06:06:20 AM
post Re: Mazilli ZVS Driver Modification Problems
[Transformer (Ferrite Core)]
davekni
January 23, 2020, 05:57:18 AM
post Doorknob vs Ceramic Disk
[Voltage Multipliers]
Andrew321
January 23, 2020, 03:57:09 AM
post Re: CT performance investigations (Pearson and DIY)
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
January 23, 2020, 12:33:44 AM
post Re: CT performance investigations (Pearson and DIY)
[Dual Resonant Solid State Tesla coils (DRSSTC)]
T3sl4co1l
January 22, 2020, 11:45:26 PM
post Re: CT performance investigations (Pearson and DIY)
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
January 22, 2020, 11:30:26 PM
post Small DIY plasma globe using ZVS oscillator
[Transformer (Ferrite Core)]
davekni
January 22, 2020, 06:21:31 AM
post Re: Mazilli ZVS Driver Modification Problems
[Transformer (Ferrite Core)]
Andrew321
January 22, 2020, 05:54:17 AM

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 
SimplePortal 2.3.6 © 2008-2014, SimplePortal