Page 1 of 1

Mikrotik synthesizer/piano programs

Posted: Sun Jun 03, 2018 9:28 pm
by altucor
Hello, i think i chose right section and place to say about it. So I've made some programs that allows you to use Mikrotik routers with beeper as synthesizers. As you know you can make "audio" scripts by typing frequencies and delays manually, but i think that was ugly. However I am didn't find any solutions to automate that things. So i've made two programs:

1. Midi to MIkrotik converter. https://github.com/altucor/midi_to_mikrotik_converter
Allows you to convert midi files in to Mikrotik script files with all delays and frequencies. But on each router you can get only one beeper, and we can't play two notes at the same time, so we have some restrictions. If you are using midi files with crossing notes, and want to get clean sound output, you need first of all prepare midi file with some midi editor(I've used FL Studio). In case when you pass that not ideal file to the program, you can get on output script with "cutting" notes. I mean the second note starts playing before previous finish playing.

Also you can go to the bin/Debug/midi_files folder in repo and try some ready to use scripts with suffix *.txt, also you can compare it with original *.mid files.

Another restriction: Some midi files can contains multiple tracks for example drums, piano, synth, etc. And we still have only one beeper for each router. So my program can gets on input one midi file and extract from it all tracks to text files with counter on end of the filename. Example: starwars_1.txt, starwars_2.txt. If you have telecommunication rack with more than one router, you can try play each track of midi file on each router, like in "floppy music videos" and make video of this ;).

Frequency limitations: Mikrotik beeper can play frequencies between around 20Hz - 4000Hz. So you can use octave or note shifter arguments(described on github page).

2. Mikrotik SSH Piano (only for Windows x32) https://github.com/altucor/MikrotikSSHPiano
So that program allows you to play on Mikrotik as on piano or one voice synth in real time. Limitations the same as for previous program. Nothing hard to use it, just run exe with arguments *username* *ip* *port*, and later enter the password. I am used in this project libssh for windows, and downloaded compiled dll's. If you dont trust to this libraries in my repository you can download it manually https://www.libssh.org/get-it/ or compile it from sources.

Why only for Windows? Because I think its easy to implement something the same to my program on Linux, using Python or Bash scripts. Also on Linux you can get very easy access to SSH via terminal and scripts. x32 because libraries i've used compiled for x32 systems.

I would be glad if my programs can be useful for you.

P.S. Sorry for my English.

Re: Mikrotik synthesizer/piano programs

Posted: Mon Jun 04, 2018 12:12 pm
by dasiu
WOW!! I thought I was the only one using the MikroTik beeper for music.

altucor - you are great!! :)

I started doing my "online composer" to generate MT music and midi previews (other way around - composing rather than taking midi), but never got it finished...
If you have telecommunication rack with more than one router, you can try play each track of midi file on each router, like in "floppy music videos" and make video of this ;).
I did that once with 4x RB433 routers, it was on the TikTube, but then the TikTube server died - and the video is gone :(

Re: Mikrotik synthesizer/piano programs

Posted: Mon Jun 04, 2018 4:28 pm
by altucor
WOW!! I thought I was the only one using the MikroTik beeper for music.
I thought the same, we are not alone ;)
I started doing my "online composer" to generate MT music and midi previews (other way around - composing rather than taking midi), but never got it finished...
Wow, "online composer", but how people can play or hear MT sounds form hardware without having it? Maybe you can share this project on github and some enthusiast can contribute to your project.

Re: Mikrotik synthesizer/piano programs

Posted: Thu Sep 06, 2018 12:44 am
by altucor
https://www.youtube.com/watch?v=g6GZVlYP7X0 Little bit song parsing techniques and how to use program

Script: https://pastebin.com/7sJ5w37B

Re: Mikrotik synthesizer/piano programs

Posted: Thu Sep 06, 2018 12:45 pm
by thobias
Hi altucor
The compiled package from github is asking for a bunch of debug versions of DLLs.
Can you try compiling in release mode and reupload?

Re: Mikrotik synthesizer/piano programs

Posted: Thu Sep 06, 2018 1:48 pm
by altucor

Re: Mikrotik synthesizer/piano programs

Posted: Thu Sep 06, 2018 2:20 pm
by thobias
Can you do the same with SSHPiano?

Re: Mikrotik synthesizer/piano programs

Posted: Thu Sep 06, 2018 2:29 pm
by altucor

Re: Mikrotik synthesizer/piano programs

Posted: Thu Sep 06, 2018 2:45 pm
by thobias
Still says I'm missing vcruntime140d.dll and ucrtbased.dll

Re: Mikrotik synthesizer/piano programs

Posted: Thu Sep 06, 2018 2:52 pm
by boen_robot
Requires VC2017 runtime I'd guess.

Re: Mikrotik synthesizer/piano programs

Posted: Thu Sep 06, 2018 3:41 pm
by altucor
I've recompiled it with statically linking. Try it https://github.com/altucor/MikrotikSSHP ... tatic-link

Re: Mikrotik synthesizer/piano programs

Posted: Thu Sep 06, 2018 4:44 pm
by sid5632
SSH.DLL and LIBEAY32.DLL both depend on MSVCR120.DLL
ZLIB1.DLL depends on both VCRUNTIME140D.DLL and UCRTBASED.DLL

Fixing the .EXE doesn't fix the .DLLs

Re: Mikrotik synthesizer/piano programs

Posted: Sat Sep 08, 2018 12:13 am
by altucor
SSH.DLL and LIBEAY32.DLL both depend on MSVCR120.DLL
ZLIB1.DLL depends on both VCRUNTIME140D.DLL and UCRTBASED.DLL

Fixing the .EXE doesn't fix the .DLLs
Yeah, you right. I'm checked other libs and they're depend on MSVC libs. The problem is in that i;'ve downloaded builded libs from https://www.libssh.org/get-it/. But at the moment it has problems with download sections for windows. Also sorry for posting it in not ready to use state, on all my computers i have environment with msvc or win sdk kits, and i forgot to check is it works on default env.

Re: Mikrotik synthesizer/piano programs

Posted: Wed Sep 26, 2018 4:13 pm
by Redmor
I've tried it with songs in MP3 converted to MIDI and the result isn't so good, I have as result notes with very high length.
I've attached Highway to Hell instrumental generated with the program.

Re: Mikrotik synthesizer/piano programs

Posted: Sun Nov 11, 2018 1:13 am
by altucor
I've tried it with songs in MP3 converted to MIDI and the result isn't so good, I have as result notes with very high length.
I've attached Highway to Hell instrumental generated with the program.
Yeah, really bad result. Can you send your midi file for analysis? I think your file is so complicated, and maybe i did not consider some combinations. Also check limitations in first post, which you have on router beeper.

Re: Mikrotik synthesizer/piano programs

Posted: Sun Nov 11, 2018 4:33 am
by allstarcomps
I think we should get some Xmas converted for the coming Holliday's coming up. Get my rb450s cherping again.

Re: Mikrotik synthesizer/piano programs

Posted: Thu Nov 15, 2018 10:01 pm
by altucor
> xmas
Why not? Check "jingle_bells_mikrotik.mid1.txt"
So i just get song "mid_Jingle bells.mid.txt" from random midi site and saw it has all notes in one instrument. So i opened it on fl studio and deleted all base notes, which has conflicts with main notes and it sounds fine. Probably user Redmor has the same problem, all notes in one midi instrument/channel and they tries to play simultaneously. At the moment my program doesn't have any logic which can prevent notes overlay in output script. So yeah you need prepare your random downloaded midi files. Hope in future i can fix that in my program.

You can check the difference on attached images called "original" and "fixed". It shows what i do to get not chopped/overlayed sound.

Also i attached midi files "mid_Jingle bells.mid.txt" and "mid_jingle_bells_mikrotik.mid.txt" which you need rename from *.mid.txt to *.mid, if you want to fix them in your way and regenerate mikrotik script.

Re: Mikrotik synthesizer/piano programs

Posted: Tue Sep 17, 2019 1:14 pm
by Rian
Hello,

really nice work! :)

Even if it's "ugly" ;) and just for the sake of completeness, maybe someone wants to experiment with it too (probably it was already linked in another post, mea culpa):

Re: Mikrotik synthesizer/piano programs

Posted: Thu Sep 19, 2019 12:58 am
by jmpg22
Guys does anyone has been able to synthesize the sound of an old modem?

I have time searching for this MIDI, in order to setup an script for wen a WAN gets up or down hahahaha.

If anyone has able to make it please donate it here for the community.

Thanks all.