Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Random chugin to Rand #53

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ List of Current Chugins
- **PowerADSR**
- by [@ericheep](https://github.com/ericheep)
- Power function ADSR envelope.
- **Rand**
- Gaussian random function.
- **WarpBuf**
- by [@dbraun](https://github.com/dbraun)
- Time-stretching and pitch-stretching sound buffer that can optionally import `asd` files from Ableton Live for beatmatching.
Expand Down
2 changes: 1 addition & 1 deletion Random/Random-test.ck → Rand/Rand-test.ck
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ float nums[0];

repeat(count)
{
Random.gaussian(0, 10) => float r;
Rand.gaussian(0, 10) => float r;
chout <= r <= IO.nl();
r +=> sum;
nums << r;
Expand Down
18 changes: 9 additions & 9 deletions Random/Random.cpp → Rand/Rand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ static void srandom( unsigned s ) { srand( s ); }


// example of getter/setter
CK_DLL_SFUN(Random_seed);
CK_DLL_SFUN(Random_gaussian);
CK_DLL_SFUN(Rand_seed);
CK_DLL_SFUN(Rand_gaussian);


CK_DLL_QUERY( Random )
CK_DLL_QUERY( Rand )
{
// hmm, don't change this...
QUERY->setname(QUERY, "Random");
QUERY->setname(QUERY, "Rand");

QUERY->begin_class(QUERY, "Random", "Object");
QUERY->begin_class(QUERY, "Rand", "Object");

QUERY->add_sfun(QUERY, Random_seed, "void", "seed");
QUERY->add_sfun(QUERY, Rand_seed, "void", "seed");
QUERY->add_arg(QUERY, "int", "seed");

QUERY->add_sfun(QUERY, Random_gaussian, "float", "gaussian");
QUERY->add_sfun(QUERY, Rand_gaussian, "float", "gaussian");
QUERY->add_arg(QUERY, "float", "mean");
QUERY->add_arg(QUERY, "float", "stdv");

Expand All @@ -54,15 +54,15 @@ CK_DLL_QUERY( Random )
}


CK_DLL_SFUN(Random_seed)
CK_DLL_SFUN(Rand_seed)
{
t_CKINT seed = GET_NEXT_INT(ARGS);

srandom(seed);
}


CK_DLL_SFUN(Random_gaussian)
CK_DLL_SFUN(Rand_gaussian)
{
t_CKFLOAT mean = GET_NEXT_FLOAT(ARGS);
t_CKFLOAT stdv = GET_NEXT_FLOAT(ARGS);
Expand Down
28 changes: 14 additions & 14 deletions Random/Random.dsp → Rand/Rand.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Random/Random.dsw → Rand/Rand.dsw
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00

###############################################################################

Project: "Random"=.\Random.dsp - Package Owner=<4>
Project: "Rand"=.\Rand.dsp - Package Owner=<4>

Package=<5>
{{{
Expand Down
2 changes: 1 addition & 1 deletion Random/Random.vcxproj → Rand/Rand.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Random.cpp" />
<ClCompile Include="Rand.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Targets" />
</Project>
4 changes: 2 additions & 2 deletions Random/makefile → Rand/makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

# chugin name
CHUGIN_NAME=Random
CHUGIN_NAME=Rand

# all of the c/cpp files that compose this chugin
C_MODULES=
CXX_MODULES=Random.cpp
CXX_MODULES=Rand.cpp

# where the chuck headers are
CK_SRC_PATH?=../chuck/include/
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions Random/makefile.win32 → Rand/makefile.win32
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ MSBUILD=msbuild.exe

ifneq (,$(CHUCK_DEBUG))
CONFIG=Debug
CHUG_BIN=Debug/Random.chug
CHUG_BIN=Debug/Rand.chug
else
CONFIG=Release
CHUG_BIN=Release/Random.chug
CHUG_BIN=Release/Rand.chug
endif

default: $(CHUG_BIN)
Expand Down
2 changes: 1 addition & 1 deletion chugins.sln
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Perlin", "Perlin\Perlin.vcx
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerADSR", "PowerADSR\PowerADSR.vcxproj", "{3ABDEB24-0F9A-4B9A-AE61-528B356AB3A9}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Random", "Random\Random.vcxproj", "{2496DF84-1D4E-4860-9072-38047C37F5B6}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Rand", "Rand\Rand.vcxproj", "{2496DF84-1D4E-4860-9072-38047C37F5B6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sigmund", "Sigmund\Sigmund.vcxproj", "{CB7C6619-BFDC-4F0D-A4C9-B24B3D00C773}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CHUGINS=ABSaturator AmbPan Bitcrusher KasFilter MagicSine FIR FoldbackSaturator \
PanN PitchTrack GVerb Mesh2D Spectacle Elliptic Sigmund ExpDelay Overdrive \
Multicomb PowerADSR WinFuncEnv WPDiodeLadder WPKorg35 \
Binaural ExpEnv Perlin Random Wavetable
Binaural ExpEnv Ladspa Perlin Rand Wavetable NHHall

CHUGS_NOT_ON_WIN32=FluidSynth
CHUGINS_WIN32=$(filter-out $(CHUGS_NOT_ON_WIN32),$(CHUGINS))
Expand Down