Shop OBEX P1 Docs P2 Docs Learn Events
Looking for an Audio Output (PWM?) Example - Page 4 — Parallax Forums

Looking for an Audio Output (PWM?) Example

124»

Comments

  • Ahle2 wrote: »
    David,
    Great!! 👍I will make an interface for C as well. That seems to be what you prefere. It should not take much effort to convert from the Spin2 interface that I have already got. Then I have to get it working in PNut since it obvoiusly needs to work in Chips interpreter to be part of demo suite. Spin2 was not implemented in PNut when I began coding and I wanted to be sure that the interpreter and compiler were stable before switching over. I Think the time has come now.
    The way I understand fastspin, you don't have to do anything to provide a C interface. I can just use your Spin interface from C. I haven't tried that yet but I think that is one of the major strengths of fastspin.

  • Ahle2Ahle2 Posts: 1,178
    David,
    Lookup "PT2 clone" for an almost 100% reinplementation of the most common tracker editor available on the Amiga in the early 90's. By todays standard it isn't very intuitive though. Then there is Modplug Tracker that should handle most 4 channel mods quite okayish.
  • If it compiles with fastspin then everyone can already use it from C (as long as they use fastspin as their C compiler). :)

    Also, if it compiles with fastspin then it should go through spin2cpp (they're practically the same program). The spin2cpp output should work in Catalina and riscvp2; at least, that's been the case for things like the VGA demo. I've spend much more time on fastspin than on spin2cpp, so it's possible there are some corner cases that don't work in spin2cpp.
  • @ersmith How do I access constants in a Spin object from C?
    struct __using("reSound.spin2") sound;
    
    // how do I do this?
    // sound#SIGNED16
    
  • David Betz wrote: »
    @ersmith How do I access constants in a Spin object from C?
    struct __using("reSound.spin2") sound;
    
    // how do I do this?
    // sound#SIGNED16
    

    You access it as "sound.signed16". The "." is the same as "#" (even in Spin, as far as fastspin is concerned) and the names are all lower case because Spin is case insensitive.

Sign In or Register to comment.