playing sndh files on ym2149 chip

Поделиться
HTML-код
  • Опубликовано: 26 окт 2024

Комментарии • 50

  • @kebman
    @kebman 4 года назад +1

    You can really hear how they pushed the chip to it's absolute limites to get the exact sound they were looking for. The guys who made music for this chip really knew what they wanted, and they pushed the technology as far as it went to get detailed, detailed tunes.

    • @jkuebler89
      @jkuebler89 2 года назад

      Couldn't have said better.

  • @memento0somniare
    @memento0somniare 8 лет назад

    Bravo, du sndh, t'es vraiment trop fort !! J'ai hâte de monter ça pour voir...

  • @FuzzyMannerz
    @FuzzyMannerz 7 лет назад

    This is awesome! I'm gonna build this when the chip arrives! Thanks for sharing. :)

  • @kebman
    @kebman 4 года назад

    I'm sure you could mage an entire catalogue just about the hacks that went into bending the chip into creating all those different sounds and samples used in this piece. It's a legit artform of hacking.

  • @jkuebler89
    @jkuebler89 2 года назад

    This is so hard, love it. Do you have experience making music for video games?

    • @florentfl9854
      @florentfl9854  2 года назад

      Nop. I usually use music made by friends for my projects / oldschool demos. Though, the music of this video has been made by 505 (an oldschool musician), and is available here sndh.atari.org/sndh/browser/index.php?dir=sndh_lf%2F505%2FRelix%2F.

  • @helmut666kohl
    @helmut666kohl 7 лет назад +3

    I tried the streamer.py on my Mac (10.10) - after unpacking the .ym (rename to .lha and use theUnarchiver) - and it looks like all is good - terminal telling me all kinds of details and running a timer. The LED blinks some times, RX blinks, then stays on but no sound comes out. (works with the other example you have on your site with the simple tones).
    When i cancel the terminal process the RX LED goes off.
    interesting: I tried to flash another .hex while the streamer was still running - and all of a sudden there is sound coming from the YM - from the streamer, but corrupted. So I guess it is something simple, maybe you know what it is?

    • @florentfl9854
      @florentfl9854  7 лет назад

      Hi helmut, this seems to be a good start if you could have the simple tones running on you hardware. As for your sound issue, one hypothesis would be that the UART configuration be different between the Arduino setting github.com/FlorentFlament/ym2149-streamer/blob/master/uart.h#L27 and the computer setting. You can set the baudrate and any other flag by using `stty` command. Be sure that the setting is the same on the Arduino and the computer, otherwise they won't be able to communicate through the UART. In my latest scripts (Though they work with the corresponding C code running on the Arduino), I set the UART speed directly into the code to avoid this issue: github.com/FlorentFlament/ym2149-sndh/blob/master/stream-sndh.py#L29

    • @helmut666kohl
      @helmut666kohl 7 лет назад

      Well it seems that it is fixed to 9600 Baud (if I can trust my logic's AutoBaud setting).
      Thats what the .py sends from my terminal. And no matter what, I cannot set the Baudrate. Is there a command in python to accomplish that?

    • @florentfl9854
      @florentfl9854  7 лет назад

      Yes, you can replace line 95 of streamer.py (github.com/FlorentFlament/ym2149-streamer/blob/master/streamer.py#L95) with `fd = serial.Serial("/dev/ttyUSB0", 57600, timeout=2)`. Then you'll have to update the indentation and import the `serial` module. See github.com/FlorentFlament/ym2149-sndh/blob/master/stream-sndh.py as an example.

    • @helmut666kohl
      @helmut666kohl 7 лет назад

      Hmm gives me an error:
      Traceback (most recent call last):
      File "streamer.py", line 127, in
      main()
      File "streamer.py", line 102, in main
      song_min, song_sec = to_minsec(header['nb_frames'], header['frames_rate'])
      TypeError: 'NoneType' object has no attribute '__getitem__'

    • @florentfl9854
      @florentfl9854  7 лет назад

      Oh my bad, it's not line #95 that has to be updated (it opens the YM file). You have to replace line #103 with `fd = serial.Serial(sys.argv[1], 57600, timeout=2)`

  • @sebastien.sauger
    @sebastien.sauger 5 месяцев назад

    Hello. Awesome !
    I have a question : Why the big bass sound at 0:15 doesn't light led ?
    How is it played by YM2149 ?

    • @florentfl9854
      @florentfl9854  5 месяцев назад

      Hi,
      As far as I remember, the Arduino controls the content of the YM2149 registers, which are interpreted by the chip to generate sounds. A program running on a PC "streams" the content of the YM2149 registers, corresponding to a tune, into the Arduino, who updates the YM2149 accordingly.
      Regarding why some sounds don't turn on the lights, I don't know/remember. It's been too long since I didn't play with this circuit.
      Regards

    • @sebastien.sauger
      @sebastien.sauger 5 месяцев назад

      Merci beaucoup pour ta reponse / many thanks for your answer from Orleans

  • @FuzzyTekShow
    @FuzzyTekShow 6 лет назад

    Which version of "sc68" did you compile for this? With the latest I'm getting "Invalid parameters "-qqqn"". I did have it working before but I don't remember which version was the right one. :(

    • @florentfl9854
      @florentfl9854  6 лет назад

      Hi, it's been a long time since I didn't touch this project. I can't remember which version of sc68 I used to use. I'd recommend that you either try the previous versions (and do some kind of binary search to find the appropriate version), or try to see if you can use the latest version with different flags .. I'm afraid I don't have a better answer

    • @FuzzyTekShow
      @FuzzyTekShow 6 лет назад

      So I finally figured it out, if anyone else has any issues I've made a post about it that hopefully helps somebody: fuzzytek.ml/linux/sc68/ :)

  • @MrTekkitWorld
    @MrTekkitWorld 5 лет назад

    how do you tune the clock of the chip?
    I bough this chip and im willing to just connect it to the arduino master clock but i see you have a crystal there, could you indicate the value?

    • @florentfl9854
      @florentfl9854  5 лет назад

      Hi, I am using a 4MHz crystal with this circuit, though this is not mandatory. You can clock the YM2149 directly from the Arduino as I did there: ruclips.net/video/MTRJdDbY048/видео.html

    • @Sebastianlogin
      @Sebastianlogin 7 месяцев назад

      I dont have and i cant buy a 4 pin oacillator, but i do have a 2 pin of the same clock, can i ise it instead of the 4 pin one,​@@florentfl9854?

  • @Gunstick
    @Gunstick 8 лет назад

    Cool. Can it play high bandwidth tunes? sndh_lf/Cube/Outpost.sndh sndh_lf/gwEm/Flash_of_the_Rom.sndh

    • @florentfl9854
      @florentfl9854  8 лет назад

      Hi, I can currently play some high bandwidth tunes like sndh_lf/Sparky/Badd_Boy-Lode_Runner_4ever.sndh , but not Outpost nor Flash_of_the_Rom yet. That would require some more work. Though I'm pretty sure that this would be doable by pooling samples that are too near from one another (some sort of compromise).

    • @Gunstick
      @Gunstick 8 лет назад

      Is the issue the atmega speed or the USB bandwidth?

    • @benovr
      @benovr 8 лет назад

      I have a binary packer for sc68 dumps that allow to change the clock granularity.
      For example
      * outpost with the mfp best precision (614723hz):
      > 2119425 / 3'35" / 78.862 kbps / 9.857 kBps
      * outpost @76840hz
      > 1801570 / 3'35" / 67.035 kbps / 8.379 kBps

    • @florentfl9854
      @florentfl9854  8 лет назад

      The bottleneck is the CPU. It currently needs about 150-200 YM cycles to get a 2 registers sample from the UART and write it to the YM. By optimizing further we may lower this interval to 100-150 YM cycles. The issue is that in the Oupost tune for instance, you have samples that are supposed to be played at 1 YM cycle interval. This is probably not possible on a real ST neither. One solution would be to pool all the events in a 200 YM cycles window.

    • @florentfl9854
      @florentfl9854  8 лет назад

      The custom clock granularity may do the trick

  • @helmut666kohl
    @helmut666kohl 7 лет назад

    Question: What documentation did you use to parse the SNDH format?
    The official site gives me a headache, but no real clues about the structure of the file…
    And your code is also not simple to read :-)

  • @Gunstick
    @Gunstick 8 лет назад +1

    To "emulate" the real ST, replace the 3 channel's resistors with... wires. OMG. Yeah, that's what Atari did. I wonder how much that affects sound quality. Use sndh_lf/505/You_Bore_\(D-Bug_180\).sndh for testing.

    • @florentfl9854
      @florentfl9854  8 лет назад

      Ok, this is odd though. I used to have the 3 channels connected together without resistor (with a unique 1K resistor to the ground) for a while, but the sound was terrible. I may give it another try..

    • @Gunstick
      @Gunstick 8 лет назад

      terrible is like Atari rolls. Yeah. Amazing. I mention that in my speech on chiptunes, have you seen it? v=yLDtiTS4JLg

    • @florentfl9854
      @florentfl9854  8 лет назад

      wow, very interesting talk. Ok I may add a switch to switch to Atari ST mode ; )

    • @Gunstick
      @Gunstick 8 лет назад

      Yeah, so you can toggle beween true YM and Atari-shit for checking how much this affects quality. For that I even will recreate your circuit as I need it for my next version of the talk.

    • @florentfl9854
      @florentfl9854  8 лет назад

      hehe. Excellent, I published my design and code there if you need: github.com/FlorentFlament/ym2149-sndh