News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Soundtrakker player in JavaScript

Started by norbert_kehrer, 09:14, 14 February 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

norbert_kehrer

I wrote a little music player in JavaScript for songs composed on the cool "Soundtrakker" program. It plays more than 300 music modules (all I could find) in the webbrowser. I did not (yet) include a full-fledged emulator for the AY-3-8910 soundchip of the CPC, but just used the standard oscillators of the browser's Web Audio API, so it will not sound as cool as on the real hardware, and sometimes be also a little bit out of tune. So, in such cases it is (mostly) not the song authors who are to blame, but my program. For most songs it seems to work quite OK, though.


You can try out the player directly right here: https://norbertkehrer.github.io/st_player/st_player.html


I also published the complete source code of my JavaScript program on Github: https://github.com/norbertkehrer/soundtrakker_player


Have fun!


Norbert

Targhan

Ahah, this is really cool stuff :).

The sound quality is not excellent though (strangely enough, using a "high quality" filter sounds really bad), and the timing seems jittery. But it's very listenable nonetheless :).

Where did you get all those Soundtrakker files? I'd like to record some for the radio.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

GUNHED

http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

BSC

Quote from: norbert_kehrer on 09:14, 14 February 21
You can try out the player directly right here: https://norbertkehrer.github.io/st_player/st_player.html


I also published the complete source code of my JavaScript program on Github: https://github.com/norbertkehrer/soundtrakker_player

This is awesome! I always wanted to do that myself, good that I don't have to do it anymore :)
I have just listened to one tune and you said it yourself: It does not yet sound like the real thing.
Are you already planning to add a full-fledged AY emulation?

In any case: Let me know if you need any input or help. I would love to support this project.
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

norecess464

Wwwooooaaahhhhh so much love for the CPC on valentine day !!!  :-* :-* :-* :-* :-*
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

norbert_kehrer

Thank you all for your nice comments.


@Targhan, thanks, most of the files are from Grim's page here https://www.grimware.org/doku.php/documentations/software/soundtrakker/start. At the bottom there is a song repository.


@BSC, first of all, thank you for Soundtrakker! I am trying to build an AY-3-8910 emulator also, but I just started. A challenge I had already with the current version is the correct timing. It is almost unbelievable, but browsers still seem to have a problem to do something reliably at a rate of 50 times per second (probably due to the underlying OS, though). But, I just read the Soundtrakker manual again yesterday, and it seems, that Soundtrakker's minimum "delay" parameter is anyway 2, so sound parameter changes should only happen 25 times per second. So, it could be fine. I will keep you posted.


So long


Norbert

Skunkfish

Wow, that's reallly nice!

Is there a way to mute individual channels?

Also, the speed goes crazy when I change tabs, but I kinda like the effect on some songs  ;D
An expanding array of hardware available at www.cpcstore.co.uk (and issue 4 of CPC Fanzine!)

Targhan

Quote from: norbert_kehrer on 07:44, 15 February 21Soundtrakker's minimum "delay" parameter is anyway 2, so sound parameter changes should only happen 25 times per second.
Mmmh, this is wrong. The replay rate is still always 50 times per second, but the change of "line" is 25hz max. This does not change how much data you have to generate.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

BSC

#8
Quote from: norbert_kehrer on 07:44, 15 February 21But, I just read the Soundtrakker manual again yesterday, and it seems, that Soundtrakker's minimum "delay" parameter is anyway 2, so sound parameter changes should only happen 25 times per second.

Well, delay 1 exists and is supported by the player. It's just the pattern display in the tracker is not fast enough, so there's no pattern display at delay 1.

Concerning the stable replay, I wonder if the solution described here would help mitigate the jitter?

https://stackoverflow.com/a/29972322
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

BSC

Quote from: norbert_kehrer on 07:44, 15 February 21I am trying to build an AY-3-8910 emulator also, but I just started.

You might not have to re-invent the wheel. Someone already did the work:

https://github.com/alexanderk23/ayumi-js
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

norbert_kehrer

Thank you for the links, BSC.


I already added the timing solution from stackoverflow you proposed. The AY emulator of Alexander Kovalenko looks (and sounds) cool also. I will include it into the player and keep you posted.


So long


Norbert

norbert_kehrer

Hi,


I replaced the simple oscillators in my little Soundtrakker player by Alexander Kovalenko's AY emulator. Thanks again to BSC for the hint. It sounds much better now (at least on a fast computer).


If you want to try the new version with more than 300 cool CPC songs, just go to https://norbertkehrer.github.io/st_player/st_player.html.


I also released the full source code here https://github.com/norbertkehrer/soundtrakker_player


Have fun!


Norbert

norecess464

Yes I confirm it sounds much better! Great work!
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

norbert_kehrer

I added a piano roll display to the Soundtrakker player to choose as an alternative to the classic note/instrument/effect display. I also included checkboxes to mute each channel individually.


If you want to try the new display variant and play around with channel muting, you can do so at https://norbertkehrer.github.io/st_player/st_player.html


Here is a screen shot showing the piano roll display:



Gryzor

My underlings coworkers here at the office surprisingly liked the tunes I played over lunch.


I think.

BSC

Quote from: Gryzor on 14:44, 23 February 21
My underlings coworkers here at the office surprisingly liked the tunes I played over lunch.

I think.


Then you probably didn't play too much of Kangaroos crappy songs  :laugh:
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

Gryzor

Quote from: BSC on 15:56, 06 March 21

Then you probably didn't play too much of Kangaroos crappy songs  :laugh:

When we get back form corona isolation, sure.

Powered by SMFPacks Menu Editor Mod