-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
385 changed files
with
70,222 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
/* | ||
This file is part of miSCellaneous, a program library for SuperCollider 3 | ||
Created: 2017-09-26, version 0.18 | ||
Copyright (C) 2009-2017 Daniel Mayer | ||
Email: [email protected] | ||
URL: http://daniel-mayer.at | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
|
||
+Integer { | ||
enum { |pool, function = true, evalAtZero = false, type = 0, order = true, maxNum = inf| | ||
// type 0: one array for all levels | ||
// type 1: array of pools (size must equal receiver) | ||
|
||
var allCols, currentCol, currentIndex = 0, indexCol, | ||
endOfEnum = false, currentPool, check, item, count = 0; | ||
|
||
order.not.if { | ||
pool = (type == 0).if { pool.scramble }{ pool.collect(_.scramble) }; | ||
}; | ||
indexCol = -1!this; | ||
currentCol = 0!this; | ||
while { endOfEnum.not }{ | ||
indexCol[currentIndex] = indexCol[currentIndex] + 1; | ||
currentPool = (type == 0).if { pool }{ pool[currentIndex] }; | ||
(indexCol[currentIndex] >= (currentPool.size)).if { | ||
indexCol[currentIndex] = -1; | ||
currentIndex = currentIndex - 1; | ||
}{ | ||
item = currentPool.at(indexCol[currentIndex]); | ||
|
||
((currentIndex == 0) && evalAtZero.not).if { | ||
true | ||
}{ | ||
function.(item, currentIndex, currentCol, indexCol) | ||
}.if { | ||
currentCol[currentIndex] = item; | ||
(currentIndex == (this - 1)).if { | ||
allCols = allCols.add(currentCol.deepCopy); | ||
count = count + 1; | ||
(count == maxNum).if { endOfEnum = true }; | ||
}{ | ||
currentIndex = currentIndex + 1 | ||
} | ||
} | ||
}; | ||
(currentIndex == -1).if { endOfEnum = true }; | ||
}; | ||
^allCols; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
|
||
/* | ||
This file is part of miSCellaneous, a program library for SuperCollider 3 | ||
Created: 2017-09-26, version 0.18 | ||
Copyright (C) 2009-2017 Daniel Mayer | ||
Email: [email protected] | ||
URL: http://daniel-mayer.at | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
|
||
PV_BinRange : PV_ChainUGen { | ||
|
||
*new { |buffer, loBin, hiBin| | ||
^this.multiNew(\control, buffer, loBin, hiBin) | ||
} | ||
|
||
*new1 { |rate, buffer, loBin, hiBin| | ||
var bufSizes = buffer.miSC_getFFTbufSizes, wipe; | ||
var bufSize = bufSizes[0]; | ||
var chain_clipped = bufSizes.collect { LocalBuf(bufSize) }; | ||
|
||
chain_clipped = PV_Copy(buffer, chain_clipped); | ||
|
||
wipe = loBin * 2 / bufSize; | ||
chain_clipped = PV_BrickWall(chain_clipped, wipe); | ||
|
||
wipe = hiBin * 2 / bufSize - 1; | ||
chain_clipped = PV_BrickWall(chain_clipped, wipe); | ||
|
||
^chain_clipped[0] | ||
} | ||
} | ||
|
||
PV_BinGap : PV_ChainUGen { | ||
|
||
*new { |buffer, loBin, hiBin| | ||
^this.multiNew(\control, buffer, loBin, hiBin) | ||
} | ||
|
||
*new1 { |rate, buffer, loBin, hiBin| | ||
var bufSizes = buffer.miSC_getFFTbufSizes, wipe; | ||
var bufSize = bufSizes[0]; | ||
var chain_gap_1 = bufSizes.collect { LocalBuf(bufSize) }; | ||
var chain_gap_2 = bufSizes.collect { LocalBuf(bufSize) }; | ||
|
||
chain_gap_1 = PV_Copy(buffer, chain_gap_1); | ||
chain_gap_2 = PV_Copy(buffer, chain_gap_2); | ||
|
||
wipe = loBin - 1 * 2 / bufSize - 1; | ||
chain_gap_1 = PV_BrickWall(chain_gap_1, wipe); | ||
|
||
wipe = hiBin + 1 * 2 / bufSize; | ||
chain_gap_2 = PV_BrickWall(chain_gap_2, wipe); | ||
|
||
^PV_Add(chain_gap_1, chain_gap_2)[0]; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
/* | ||
This file is part of miSCellaneous, a program library for SuperCollider 3 | ||
Created: 2017-09-26, version 0.18 | ||
Copyright (C) 2009-2017 Daniel Mayer | ||
Email: [email protected] | ||
URL: http://daniel-mayer.at | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
|
||
+ FFT { | ||
miSC_getFFTbufSizes { | ||
^[this.inputs[0].inputs[1]] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
/* | ||
This file is part of miSCellaneous, a program library for SuperCollider 3 | ||
Created: 2017-09-26, version 0.18 | ||
Copyright (C) 2009-2017 Daniel Mayer | ||
Email: [email protected] | ||
URL: http://daniel-mayer.at | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
|
||
+ SequenceableCollection { | ||
miSC_getFFTbufSizes { | ||
^this.collect { |x| x.miSC_getFFTbufSizes[0] } | ||
} | ||
} |
Oops, something went wrong.