BTW, I’m just checking out UE4 on Linux. How long did it take to build?
Csound wrapper/plugin for Unreal Engine
probably about an hour or two, just left it going,
As for the simple csd, I tested that but it kept crashing, so I tried my theory that it was because it got instantiated every shot, and tried to set it up to chnset “playSound” every time the init function ran, all leading up to the same crash, I’m thinking maybe I should bite the bullet and just install it on my windows drive lol
here’s the CSD I’m using, and this happens after csound segfaults:
test.csd (466 Bytes)
I think it probably gets reinitialised every time because in the blueprint add OurClassName gets triggered after spawning a projectile, so every time a projectile spawns an instance of our class gets added? Could well be wrong though
What IDE and debugger are you using?
Also leads to a full crash of Unreal editor hahahahah, so takes about 5 mins for it to reopen every time (even tho I’ve got 16gb ram, an i7 and a GTX970 hahahha)
I’m using vscode to edit and then just pressing compile in Unreal, didnt see an easy way to run it hosted in a debugger
Yikes. Get over to Windows. The integration with Visual Studio makes it much much easier. And you can run UE4 in the VS debugger too. Plus, I assume that in terms of releases you will be prioritising Windows over Linux? I’m curious to see how quickly this builds on my work PC. It’s pretty high-end
Yeah I’d say I’ll bite the bullet and do that now, I think Mac is actually probably priority but my 2011 mac mini would actually probably catch fire!
Downloading this stuff is taking 4ever. I’m not even sure why I’m building on Linux. I just want to see how fast it builds, and I have a zillion TBs of space, so why not
Hey you gotta stay busy in quarantine somehow, here’s my solution:
My solution was to write a multiplayer card game framework in JS. It’s a nightmare
Just got UE on windows, just wondering how you ignored the LIKELY and UNLIKELY Collisions? also I’m so in for that ahahah
Hang on, I need to boot back into windows to check. I’m sick of waiting for Unreal to download.
I edited the sysdep.h file, I remove the last if _GNUC_
ifdef. And ignored the likely warnings. They look like the exact same macro anyway, so i don’t think it’s really an issue.
This is the end of my sysdep.h file:
/* The ignore_value() macro is taken from GNULIB ignore-value.h,
licensed under the terms of the LGPLv2+
Normally casting an expression to void discards its value, but GCC
versions 3.4 and newer have __attribute__ ((__warn_unused_result__))
which may cause unwanted diagnostics in that case. Use __typeof__
and __extension__ to work around the problem, if the workaround is
known to be needed. */
// #if 3 < __GNUC__ + (4 <= __GNUC_MINOR__)
// # define ignore_value(x) \
// (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; }))
// #else
# define ignore_value(x) ((void) (x))
// #endif
Btw, it doesn’t matter if you create a constructor for that USynth derived class. It still create an object each time you shoot. FMOD API does something similar for it’s synth sounds. it’s a pain in the ass because we need to create a new Csound object each time. On the other hand, it still works pretty well…
I think it might be best to use USoundWaveProcedural…
Jesus christ worked first try on windows, I GUESS Linux handles it differently? Yeah the restarting is gonna be a problem, wonder if theres a way I can pass a reference to a Csound struct to that class somehow so its lifecycle is handled outside of the SynthComponent?
I’m going to try a USoundWave and see what the story is there…
This sounds like you want to crack a nut with a sledge hammer Better to see what UE4 offers first in terms of sound objects. This stuff is so easy with Unity
See this might actually be a non issue, because I don’t plan on having the csound audio linked to an event like a moust click per se, moreso that on level load it starts a csd and then say the players position sets a control channel when it updates, so ideally its lifecycle would be the same as the level and it could be treated almost like background music instead of a one shot
Dunno if that made sense, basically the csd would be always running on a particular level and its parameters would get set when the player does ‘stuff’
Setting the parameters is trivial through channels, as well you know. But I think it’s best for now to let the UE4 audio component manage Csound. Otherwise set up a new component t that will act as a Csound singleton, and feed into it with your child components. This is how we do it in CsoundUnity now, IF you wish to have one only instance of Csound.
Hmm, the USoundWave stuff doesn’t seem to be accessible through blueprints. Maybe I need to derive from a parent class…
Ok, I’ve no idea how to add a SoundWave object to a BP. I’ve never used this before. The synth class is a component, do we need an audio component parent for our SoundWave object? Who knows. UE is such a pain at times.