Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
N7 version 24.01.19 released
#7
(01-21-2024, 01:56 AM)johnno56 Wrote: I am curious... There does not seem to be a "library" for "createsound()". How did you manage to get N7 to create sounds? (if this is a "herbs and spices" kind of thing, then just ignore the request... lol)

J

Sometimes a library isn't enough. I could have solved it directly in n7 by generating a temporary wav file and loading it with 'loadsound', but that felt dirty, so I decided to add a function to the core of the language instead. Its communication with the runtime is implemented in source/syscmd.c (CreateSound) and the actual work in source/audio_portaudio.c (AUD_CreateSound and BuildSoundData - also used when converting data from wav files to n7's fixed sample rate). That's why I had to release a new version of n7 for this to work Smile

I'm planning to write a library, written in n7, that uses 'createsound' to generate cool sound effects. The functions I wrote for the example (CreateSineSfx, CreateSquareSfx and CreateNoiseSfx), also used in denaalaafender, were just a test of 'createsound'.
Reply


Messages In This Thread
N7 version 24.01.19 released - by Marcus - 01-19-2024, 10:02 PM
RE: N7 version 24.01.19 released - by johnno56 - 01-20-2024, 01:44 PM
RE: N7 version 24.01.19 released - by kevin - 01-20-2024, 04:31 PM
RE: N7 version 24.01.19 released - by Marcus - 01-20-2024, 09:14 PM
RE: N7 version 24.01.19 released - by johnno56 - 01-21-2024, 01:56 AM
RE: N7 version 24.01.19 released - by Marcus - 01-21-2024, 09:26 AM
RE: N7 version 24.01.19 released - by johnno56 - 01-21-2024, 06:01 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)