Skip to content

Commit

Permalink
pages
Browse files Browse the repository at this point in the history
  • Loading branch information
naus3a committed Dec 12, 2017
1 parent d0c8a65 commit c9f3d94
Show file tree
Hide file tree
Showing 6 changed files with 324 additions and 15 deletions.
Binary file removed .README.md.swp
Binary file not shown.
103 changes: 103 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>NauModular - VCV Rack plugin</title>
<link href="spectre.css" rel="stylesheet" type="text/css">
<link href="pages/cointipper.css" rel="stylesheet" type="text/css">
<meta name="description" content="NauModular: a VCV Rack plugin including Perlin noise, sample and hold, function generators, logic">


</head>
<body>
<div id="wrapper">
<div id="propaganda">
<h1>NauModular VCV plugin</h1>
<div id="bio">This is my personal collection of modules for <a href="https://vcvrack.com">VCV Rack</a>: feel free to use them and modify them as you wish. If you find them useful, <a href="#tip">feel free to get me a beer</a>.<br>
The plugin is open source, so you can find <a href="https://github.com/naus3a/NauModular">the source code here</a>.<br>
If you don't want to compile it yourself, <a href="https://github.com/naus3a/NauModular/releases">here are the most recent builds</a>.</div>
<div id="artworks">
<div class="asciiTable">
<table class="awTable">
<tr>
<td class="awTitle" colSpan="2"><h2><a name="perlin">Perlin</a></h2></td>
</tr>
<tr>
<td class="awSection"><img src="https://raw.githubusercontent.com/naus3a/NauModular/master/perlin.png"></td>
<td class="awField"><b>Perlin</b> is a <a href="https://en.wikipedia.org/wiki/Perlin_noise">Perlin noise</a> generator.<br>
The <i>speed knob</i> controls how much nervous the noise is. On its side you have a CV control input and a smaller knob to balance the final speed between the main knob's value and the CV input.<br>
The <i>amp knob</i> controls noise amplitude. On its side threre's a CV control input and a balancing knob, just like for the speed control.<br>
The lower 4 knobs are a <i>frequency mixer</i>: the module constantly calculates 4 noise octaves and each of these knobs controls how much of a specific octaves goes into the final mix.

The 4 outputs positioned in a square shape are *single octave outputs*; they are in the same order as the frequency mixer knobs: the top left one outputs the slowest noise, the bottom right one outputs the fastest noise.

The lowest, central output is the *mix output*, giving you a mix of the noise octaves based on your frequency mixer settings.

</td>
</tr>

<tr>
<td class="awTitle" colSpan="2"><h2><a name="shit">S&H(it)</a></h2></td>
</tr>
<tr>
<td class="awSection"><img src="https://raw.githubusercontent.com/naus3a/NauModular/master/shit.png"></td>
<td class="awField"><b>S&H(it)</b> is a sample and hold module. The <i>time knob</i> controls how often it samples the input signal; the <i>divider knob</i> scales the other knob's value, so yu can range from very quick lo-fi sampling to >1s periods.

</td>
</tr>

</tr>

<tr>
<td class="awTitle" colSpan="2"><h2><a name="bithammer">BitHammer</a></h2></td>
</tr>
<tr>
<td class="awSection"><img src="https://raw.githubusercontent.com/naus3a/NauModular/master/bithammer.png"></td>
<td class="awField"><b>BitHammer</b> is a logic module performing bitwise operations on 2 inputs. The incoming values are rendered as bits, hammered, reassembled as virtual voltages and finally sent out to the 6 outputs. </td>
</tr>

<tr>
<td class="awTitle" colSpan="2"><h2><a name="tension">Tension</a></h2></td>
</tr>
<tr>
<td class="awSection"><img src="https://raw.githubusercontent.com/naus3a/NauModular/master/tension.png"></td>
<td class="awField"><b>Tension</b> is a fixed voltage generator: you turn the knob, you change the voltage. Useful when playing with logic chains or if you need to power up a virtual lamp ;) .
</td>
</tr>

<tr>
<td class="awTitle" colSpan="2"><h2><a name="function">Function</a></h2></td>
</tr>
<tr>
<td class="awSection"><img src="https://raw.githubusercontent.com/naus3a/NauModular/master/function.png"></td>
<td class="awField"><b>Function</b> is a function generator; it outputs the 3 conic section functions you learned in high school: ellipse, parabola and hyperbola. Input voltage acts as the x variable, while the knob is a constant parameter.
</td>
</tr>

</table>
</div>
</div>

<div id="contacts">
<a name="tip">***</a><br>
I work on this stuff in my free time and mainly for myself, so the features in modules reflect what I personally thought it would be fun, some parts might be a bit rough around the edges and new releases are going to be random. Anyway, if you like the plugin, feel free to contribute with code if you're a coder, or with a beer sized donation if you're a user feeling super duper gentle :)
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name ="cmd" value="_donations">
<input type="hidden" name="item_name" value="NauModular">
<input type="hidden" name="item_number" value="VCV plugin">
<input type="hidden" name="currency_code" value="EUR">
<input type="image" name="submit" src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_donate_92x26.png" alt="Donate">
<img alt="" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >

</form>

<div id="coinwidget" data-icon="true" data-type="primary" data-wallet="1Q628TeDopNjHstxqCmBFQq53mfY9o1npp" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/ivandiazwm/[email protected]/builds/full.js" charset="utf-8"></script>
</div>

</div>

</div>
</body>
207 changes: 207 additions & 0 deletions spectre.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
* {margin: 0; padding: 0;}

body {
text-align: center;
}

#ascii{
font-family: monospace;
font-size: 10px;
line-height: 70%;
}

#tentacleSprite{
display: none;
}

#wrapper{
margin-left:auto;
margin-right:auto;
height:auto;
width:auto;
}

#container{
overflow: hidden;
display: inline-block;
}

#propaganda{
display: inline-block;
}

#propaganda h1{
font-family: monospace;
font-weight: normal;
font-size: 30px;
}

#propaganda h2{
font-family: monospace;
font-weight: normal;
font-size: 20px;
}

#contacts{
width: 450px;
height: auto;
font-family: monospace;
font-size: 14px;
}

#bio{
width: 500px;
height: auto;
font-family: monospace;
font-size: 14px;
text-align: left;
}

#artworks{
width: 500px;
height: auto;
font-family: monospace;
font-size: 14px;
}

#exhibitions{
display: none;
width: 500px;
height: auto;
font-family: monospace;
font-size: 14px;
}

.asciiCode{
display:block;
letter-spacing: 0px;
line-height:70%;
font-size: 5px;
font-weight:bold;
white-space:pre;
font-family: monospace;
color: black;
}

a:link {
color: black;
text-decoration: none;
}

a:visited {
color: gray;
text-decoration: none;
}

a:hover {
color: red;
text-decoration: none;
}

a:active {
color: red;
text-decoration: none;
}

.asciiTable{
font-family: monospace;
font-size: 14px;
margin: 1em;
display: inline-block;
position: relative;
}

.asciiTable table{
border-collapse: collapse;
}

.asciiTable td{
border: 1px dashed #000;
padding: .5em;
position: relative;
}

.asciiTable td:before{
position: absolute;
width: 15px;
height: 15px;
content: "+";
top: -9px;
left: -8px;
}

.asciiTable tr td:last-child:after, .asciiTable tr:last-child td:after {
position: absolute;
width: 15px;
height: 15px;
content: "+";
bottom: -9px;
right: -8px;
}

.asciiTable tr td:last-child:after, .asciiTable tr:last-child td:after {
position: absolute;
width: 15px;
height: 15px;
content: "+";
bottom: -9px;
right: -8px;
}
.asciiTable:before {
position: absolute;
width: 15px;
height: 15px;
content: "+";
top: -8px;
right: -7px;
}

.asciiTable:after {
position: absolute;
width: 15px;
height: 15px;
content: "+";
bottom: -8px;
left: -7px;
}

.menuTable td{
width: 100px;
}

.awTable table{
width: 500px;
}

.awTable tr{
width: 500px;
}

.awTitle td{
width: 500px;
}

.awSection td{
width: 80px;
}

.awField td{
width: 420px;
text-align: left;
}

.exRow table{
width: 500px;
}

.exYear td{
width: 50px;
}

.exPlace td{
width: 100px;
}

.exEvent td{
width: 350px;
}
Binary file removed src/.BitHammer.cpp.swp
Binary file not shown.
27 changes: 13 additions & 14 deletions src/Perlin.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "NauModular.hpp"
//#define DEBUG_PERLIN
#define DEBUG_PERLIN
#ifdef DEBUG_PERLIN
#include <iostream>
#include <limits.h>
Expand Down Expand Up @@ -45,7 +45,7 @@ struct Perlin : Module{

void step() override;

float grad(int hash, float x);
float grad(int hash, float x);
float getNoise(float x);
void mixOctaves(float * nn);

Expand Down Expand Up @@ -133,7 +133,7 @@ float Perlin::getNoise(float x){
n0 = t0*t0*grad(perm[i0 & 0xff], x0);
t1 *= t1;
n1 = t1*t1*grad(perm[i1 & 0xff], x1);
return 0.25 * (n0+n1);
return (0.25 * (n0+n1));
}

void Perlin::mixOctaves(float * nn){
Expand All @@ -154,21 +154,17 @@ float Perlin::getMixed(float & _val0, float & _val1, float & _mix){
}

void Perlin::step(){
float deltaTime = 1.0 / engineGetSampleRate();
float deltaTime = 1.0/engineGetSampleRate();
curTime += deltaTime;
if(!isfinite(curTime)) curTime = 0.0;


float noiseSpd = params[SPEED_PARAM].value;
if(hasWire(SPEED_INPUT)){
float spdIn = inputs[SPEED_INPUT].value/12.0;
noiseSpd = getMixed(spdIn, noiseSpd, params[SPEED_PCT_PARAM].value);
}

float noiseSpd = params[SPEED_INPUT].value;
float spdIn = inputs[SPEED_INPUT].value/5.0;
noiseSpd = getMixed(spdIn, noiseSpd, params[SPEED_PCT_PARAM].value);

float noiseAmp = params[MULT_PARAM].value;
float ampIn = inputs[MULT_INPUT].value;
noiseAmp = getMixed(ampIn, noiseAmp, params[MULT_PCT_PARAM].value);
noiseAmp = getMixed(ampIn, noiseAmp, params[MULT_PCT_PARAM].value);

float octMult = 1.0;
for(int i=0;i<nOctaves;i++){
noise[i] = noiseAmp * getNoise(curTime * noiseSpd * octMult);
Expand All @@ -177,6 +173,9 @@ void Perlin::step(){
}

mixOctaves(noise);

//std::cout<<"cippa "<<curTime<<std::endl;

}

PerlinWidget::PerlinWidget(){
Expand Down
2 changes: 1 addition & 1 deletion src/S_h_it.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct S_h_it : Module{
void S_h_it::step(){
float deltaTime = 1.0 / engineGetSampleRate();
curTime += deltaTime;
if(!isfinite(curTime)) curTime = 0.0;
if(!std::isfinite(curTime)) curTime = 0.0;

float timeElapsed = fabs(curTime-lastTime);
float timeInterval = params[TIME_PARAM].value / params[MULT_PARAM].value;
Expand Down

0 comments on commit c9f3d94

Please sign in to comment.