Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
Tidal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PLN
Tidal
Commits
7b67c9c1
Commit
7b67c9c1
authored
a month ago
by
PLN (Algolia)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
viz: v2
parent
9a16f5db
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
193 additions
and
112 deletions
+193
-112
Background.pde
viz/Background.pde
+30
-27
Grid.pde
viz/Grid.pde
+40
-26
ParVaguesViz.pde
viz/ParVaguesViz.pde
+0
-0
TrackManager.pde
viz/TrackManager.pde
+66
-46
parvagues_metadata.txt
viz/data/parvagues_metadata.txt
+6
-0
launch.sh
viz/launch.sh
+51
-13
No files found.
viz/Background.pde
View file @
7b67c9c1
/**
/**
* Background class
* Background class
- Improved version
*
*
* Creates a dynamic cyberpunk background with subtle animations
* Creates a dynamic cyberpunk background with subtle animations
* Reduced visual noise for better event visibility
*/
*/
class
Background
{
class
Background
{
// Background properties
// Background properties
...
@@ -10,19 +11,19 @@ class Background {
...
@@ -10,19 +11,19 @@ class Background {
color
accentColor2
;
color
accentColor2
;
// Movement properties
// Movement properties
float
noiseScale
=
0.0
2
;
float
noiseScale
=
0.0
1
;
// Reduced from 0.02 for subtler pattern
float
noiseOffset
=
0
;
float
noiseOffset
=
0
;
float
noiseSpeed
=
0.00
5
;
float
noiseSpeed
=
0.00
3
;
// Reduced from 0.005 for slower movement
// Timing
// Timing
float
cps
=
0.5
;
float
cps
=
0.5
;
float
lastCycleTime
=
0
;
float
lastCycleTime
=
0
;
Background
()
{
Background
()
{
// Dark
cyberpunk color
s
// Dark
er cyberpunk colors for better contrast with event
s
bgColor
=
color
(
10
,
12
,
18
);
bgColor
=
color
(
5
,
7
,
12
);
// Darker than original
accentColor1
=
color
(
0
,
70
,
100
);
accentColor1
=
color
(
0
,
50
,
80
);
// More subtle
accentColor2
=
color
(
60
,
0
,
80
);
accentColor2
=
color
(
40
,
0
,
60
);
// More subtle
}
}
void
update
()
{
void
update
()
{
...
@@ -39,58 +40,60 @@ class Background {
...
@@ -39,58 +40,60 @@ class Background {
void
display
()
{
void
display
()
{
// Create gradient background
// Create gradient background
noiseDetail
(
8
,
0.5
);
noiseDetail
(
4
,
0.4
);
// Simplified noise
// Fill with base color
// Fill with base color
- more transparent for more visible motion trails
noStroke
();
noStroke
();
fill
(
bgColor
,
40
);
// Semi-transparent for motion blur effect
fill
(
bgColor
,
30
);
// Reduced from 40
rect
(
0
,
0
,
width
,
height
);
rect
(
0
,
0
,
width
,
height
);
// Add subtle noise pattern
// Add subtle noise pattern
float
motionFactor
=
sin
(
millis
()
*
0.00
1
)
*
0.5
+
0.5
;
float
motionFactor
=
sin
(
millis
()
*
0.00
05
)
*
0.5
+
0.5
;
// Slowed from 0.001
loadPixels
();
// Reduced noise pattern density - iterate every 8 pixels instead of 4
for
(
int
y
=
0
;
y
<
height
;
y
+=
4
)
{
for
(
int
y
=
0
;
y
<
height
;
y
+=
8
)
{
for
(
int
x
=
0
;
x
<
width
;
x
+=
4
)
{
for
(
int
x
=
0
;
x
<
width
;
x
+=
8
)
{
float
noiseVal
=
noise
(
x
*
noiseScale
,
y
*
noiseScale
,
noiseOffset
);
float
noiseVal
=
noise
(
x
*
noiseScale
,
y
*
noiseScale
,
noiseOffset
);
if
(
noiseVal
>
0.7
)
{
// Only draw higher noise values (reduced density)
if
(
noiseVal
>
0.8
)
{
// Increased from 0.7
color
pixelColor
;
color
pixelColor
;
// Create different zones
// Create different zones
if
(
noiseVal
>
0.
85
)
{
if
(
noiseVal
>
0.
9
)
{
// Increased from 0.85
// Highlight areas
// Highlight areas
pixelColor
=
lerpColor
(
accentColor1
,
accentColor2
,
pixelColor
=
lerpColor
(
accentColor1
,
accentColor2
,
sin
(
x
*
0.0
1
+
millis
()
*
0.0005
)
*
0.5
+
0.5
);
sin
(
x
*
0.0
05
+
millis
()
*
0.0002
)
*
0.5
+
0.5
);
pixelColor
=
color
(
red
(
pixelColor
),
green
(
pixelColor
),
blue
(
pixelColor
),
pixelColor
=
color
(
red
(
pixelColor
),
green
(
pixelColor
),
blue
(
pixelColor
),
20
+
20
*
motionFactor
);
15
+
10
*
motionFactor
);
// Reduced from 20+20
}
else
{
}
else
{
// Subtle accent
// Subtle accent
pixelColor
=
lerpColor
(
bgColor
,
accentColor1
,
0.
3
);
pixelColor
=
lerpColor
(
bgColor
,
accentColor1
,
0.
2
);
// Reduced from 0.3
pixelColor
=
color
(
red
(
pixelColor
),
green
(
pixelColor
),
blue
(
pixelColor
),
10
);
pixelColor
=
color
(
red
(
pixelColor
),
green
(
pixelColor
),
blue
(
pixelColor
),
8
);
// Reduced from 10
}
}
// Draw
4x4 pixel block for better performanc
e
// Draw
8x8 pixel block for better performance and subtler textur
e
fill
(
pixelColor
);
fill
(
pixelColor
);
rect
(
x
,
y
,
4
,
4
);
rect
(
x
,
y
,
8
,
8
);
}
}
}
}
}
}
// Draw horizontal scan lines
// Draw horizontal scan lines
- fewer and more subtle
drawScanlines
();
drawScanlines
();
}
}
void
drawScanlines
()
{
void
drawScanlines
()
{
stroke
(
255
,
8
);
// Fewer scan lines (every 8 pixels instead of 4)
stroke
(
255
,
5
);
// Reduced from 8
strokeWeight
(
1
);
strokeWeight
(
1
);
for
(
int
y
=
0
;
y
<
height
;
y
+=
4
)
{
for
(
int
y
=
0
;
y
<
height
;
y
+=
8
)
{
line
(
0
,
y
,
width
,
y
);
line
(
0
,
y
,
width
,
y
);
}
}
// Draw brighter scanline that moves
// Draw brighter scanline that moves
float
movingScanline
=
(
millis
()
%
5000
)
/
5000.0
*
height
;
float
movingScanline
=
(
millis
()
%
8000
)
/
8000.0
*
height
;
// Slower movement (5000 to 8000)
stroke
(
255
,
1
5
);
stroke
(
255
,
1
0
);
// Reduced from 15
strokeWeight
(
2
);
strokeWeight
(
2
);
line
(
0
,
movingScanline
,
width
,
movingScanline
);
line
(
0
,
movingScanline
,
width
,
movingScanline
);
}
}
...
...
This diff is collapsed.
Click to expand it.
viz/Grid.pde
View file @
7b67c9c1
/**
/**
* Grid class
* Grid class
- Improved version
*
*
* Creates a cyberpunk grid with pulse effects that react to the music
* Creates a cyberpunk grid with pulse effects that react to the music
* Reduced number of lines for cleaner visuals
*/
*/
class
Grid
{
class
Grid
{
// Grid properties
// Grid properties
...
@@ -17,9 +17,18 @@ class Grid {
...
@@ -17,9 +17,18 @@ class Grid {
color
gridColor
;
color
gridColor
;
color
accentColor
;
color
accentColor
;
// Reduced line counts for cleaner visuals
int
verticalLines
=
10
;
// reduced from 20
int
horizontalLines
=
8
;
// reduced from 15
int
polarCircles
=
5
;
// reduced from 10
int
polarRadials
=
8
;
// reduced from 16
// Alpha values for better visibility
int
defaultAlpha
=
30
;
// reduced from 50
Grid
()
{
Grid
()
{
gridColor
=
color
(
0
,
150
,
180
,
50
);
gridColor
=
color
(
0
,
150
,
180
,
defaultAlpha
);
accentColor
=
color
(
0
,
255
,
255
,
10
0
);
accentColor
=
color
(
0
,
255
,
255
,
8
0
);
}
}
void
update
()
{
void
update
()
{
...
@@ -44,24 +53,30 @@ class Grid {
...
@@ -44,24 +53,30 @@ class Grid {
void
drawStandardGrid
()
{
void
drawStandardGrid
()
{
strokeWeight
(
1
);
strokeWeight
(
1
);
// Draw vertical lines
// Draw vertical lines
(reduced count)
float
verticalSpacing
=
width
/
20.0
;
float
verticalSpacing
=
width
/
(
float
)
verticalLines
;
for
(
int
i
=
0
;
i
<=
20
;
i
++
)
{
for
(
int
i
=
0
;
i
<=
verticalLines
;
i
++
)
{
float
x
=
i
*
verticalSpacing
;
float
x
=
i
*
verticalSpacing
;
float
intensity
=
pulseIntensity
*
(
1
-
abs
((
x
/
width
)
-
0.5
)
*
2
);
float
intensity
=
pulseIntensity
*
(
1
-
abs
((
x
/
width
)
-
0.5
)
*
2
);
stroke
(
lerpColor
(
gridColor
,
accentColor
,
intensity
));
// Only draw lines with enough visibility
line
(
x
,
0
,
x
,
height
);
if
(
intensity
>
0.05
||
i
%
2
==
0
)
{
stroke
(
lerpColor
(
gridColor
,
accentColor
,
intensity
));
line
(
x
,
0
,
x
,
height
);
}
}
}
// Draw horizontal lines
// Draw horizontal lines
(reduced count)
float
horizontalSpacing
=
height
/
15.0
;
float
horizontalSpacing
=
height
/
(
float
)
horizontalLines
;
for
(
int
i
=
0
;
i
<=
15
;
i
++
)
{
for
(
int
i
=
0
;
i
<=
horizontalLines
;
i
++
)
{
float
y
=
i
*
horizontalSpacing
;
float
y
=
i
*
horizontalSpacing
;
float
intensity
=
pulseIntensity
*
(
1
-
abs
((
y
/
height
)
-
0.5
)
*
2
);
float
intensity
=
pulseIntensity
*
(
1
-
abs
((
y
/
height
)
-
0.5
)
*
2
);
stroke
(
lerpColor
(
gridColor
,
accentColor
,
intensity
));
// Only draw lines with enough visibility
line
(
0
,
y
,
width
,
y
);
if
(
intensity
>
0.05
||
i
%
2
==
0
)
{
stroke
(
lerpColor
(
gridColor
,
accentColor
,
intensity
));
line
(
0
,
y
,
width
,
y
);
}
}
}
// Draw horizon line with stronger pulse
// Draw horizon line with stronger pulse
...
@@ -74,21 +89,20 @@ class Grid {
...
@@ -74,21 +89,20 @@ class Grid {
pushMatrix
();
pushMatrix
();
translate
(
width
/
2
,
height
/
2
);
translate
(
width
/
2
,
height
/
2
);
// Draw circular grid
// Draw circular grid
(reduced count)
noFill
();
noFill
();
for
(
int
i
=
1
;
i
<=
10
;
i
++
)
{
for
(
int
i
=
1
;
i
<=
polarCircles
;
i
++
)
{
float
radius
=
i
*
(
min
(
width
,
height
)
/
20.0
);
float
radius
=
i
*
(
min
(
width
,
height
)
/
(
polarCircles
*
2.0
)
);
float
intensity
=
pulseIntensity
*
(
1
-
(
i
/
10.0
)
*
0.8
);
float
intensity
=
pulseIntensity
*
(
1
-
(
i
/
(
float
)
polarCircles
)
*
0.8
);
stroke
(
lerpColor
(
gridColor
,
accentColor
,
intensity
));
stroke
(
lerpColor
(
gridColor
,
accentColor
,
intensity
));
strokeWeight
(
1
+
intensity
*
2
);
strokeWeight
(
1
+
intensity
*
2
);
ellipse
(
0
,
0
,
radius
*
2
,
radius
*
2
);
ellipse
(
0
,
0
,
radius
*
2
,
radius
*
2
);
}
}
// Draw radial lines
// Draw radial lines (reduced count)
int
numRadials
=
16
;
for
(
int
i
=
0
;
i
<
polarRadials
;
i
++
)
{
for
(
int
i
=
0
;
i
<
numRadials
;
i
++
)
{
float
angle
=
i
*
TWO_PI
/
polarRadials
;
float
angle
=
i
*
TWO_PI
/
numRadials
;
float
intensity
=
pulseIntensity
*
0.8
;
float
intensity
=
pulseIntensity
*
0.8
;
stroke
(
lerpColor
(
gridColor
,
accentColor
,
intensity
));
stroke
(
lerpColor
(
gridColor
,
accentColor
,
intensity
));
...
@@ -102,7 +116,7 @@ class Grid {
...
@@ -102,7 +116,7 @@ class Grid {
}
}
void
drawHexGrid
()
{
void
drawHexGrid
()
{
float
hexSize
=
40
;
float
hexSize
=
60
;
// Increased from 40 for fewer hexagons
float
horizontalSpacing
=
hexSize
*
1.5
;
float
horizontalSpacing
=
hexSize
*
1.5
;
float
verticalSpacing
=
hexSize
*
sqrt
(
3
);
float
verticalSpacing
=
hexSize
*
sqrt
(
3
);
...
@@ -110,8 +124,8 @@ class Grid {
...
@@ -110,8 +124,8 @@ class Grid {
strokeWeight
(
1
+
pulseIntensity
*
2
);
strokeWeight
(
1
+
pulseIntensity
*
2
);
noFill
();
noFill
();
for
(
int
row
=
-
1
;
row
<
height
/
verticalSpacing
+
1
;
row
++
)
{
for
(
int
row
=
-
1
;
row
<
height
/
verticalSpacing
+
1
;
row
+=
2
)
{
// Skip rows
for
(
int
col
=
-
1
;
col
<
width
/
horizontalSpacing
+
1
;
col
++
)
{
for
(
int
col
=
-
1
;
col
<
width
/
horizontalSpacing
+
1
;
col
+=
2
)
{
// Skip columns
float
xCenter
=
col
*
horizontalSpacing
+
((
row
%
2
==
0
)
?
0
:
horizontalSpacing
/
2
);
float
xCenter
=
col
*
horizontalSpacing
+
((
row
%
2
==
0
)
?
0
:
horizontalSpacing
/
2
);
float
yCenter
=
row
*
verticalSpacing
;
float
yCenter
=
row
*
verticalSpacing
;
...
@@ -119,7 +133,7 @@ class Grid {
...
@@ -119,7 +133,7 @@ class Grid {
float
distFromCenter
=
dist
(
xCenter
,
yCenter
,
width
/
2
,
height
/
2
)
/
(
width
/
2
);
float
distFromCenter
=
dist
(
xCenter
,
yCenter
,
width
/
2
,
height
/
2
)
/
(
width
/
2
);
float
intensity
=
pulseIntensity
*
(
1
-
distFromCenter
*
0.7
);
float
intensity
=
pulseIntensity
*
(
1
-
distFromCenter
*
0.7
);
if
(
intensity
>
0.05
)
{
if
(
intensity
>
0.05
||
(
row
%
4
==
0
&&
col
%
4
==
0
)
)
{
stroke
(
lerpColor
(
gridColor
,
accentColor
,
intensity
));
stroke
(
lerpColor
(
gridColor
,
accentColor
,
intensity
));
drawHexagon
(
xCenter
,
yCenter
,
hexSize
);
drawHexagon
(
xCenter
,
yCenter
,
hexSize
);
}
}
...
...
This diff is collapsed.
Click to expand it.
viz/ParVaguesViz.pde
View file @
7b67c9c1
This diff is collapsed.
Click to expand it.
viz/TrackManager.pde
View file @
7b67c9c1
/**
/**
* TrackManager class
* TrackManager class
- Improved version
*
*
* Handles the management and visualization of TidalCycles tracks (d1-d16)
* Handles the management and visualization of TidalCycles tracks (d1-d16)
* E
ach track has its own visual representation and effects
* E
nhanced visibility for events and track visualization
*/
*/
class
TrackManager
{
class
TrackManager
{
ArrayList
<
Track
>
tracks
;
ArrayList
<
Track
>
tracks
;
...
@@ -36,15 +36,15 @@ class TrackManager {
...
@@ -36,15 +36,15 @@ class TrackManager {
}
}
void
display
()
{
void
display
()
{
// Display active events first (behind tracks)
for
(
SoundEvent
event
:
activeEvents
)
{
event
.
display
();
}
// Display all tracks
// Display all tracks
for
(
Track
track
:
tracks
)
{
for
(
Track
track
:
tracks
)
{
track
.
display
();
track
.
display
();
}
}
// Display all active events
for
(
SoundEvent
event
:
activeEvents
)
{
event
.
display
();
}
}
}
void
addEvent
(
int
orbit
,
String
sound
,
float
gain
,
float
pan
,
float
delta
)
{
void
addEvent
(
int
orbit
,
String
sound
,
float
gain
,
float
pan
,
float
delta
)
{
...
@@ -57,30 +57,41 @@ class TrackManager {
...
@@ -57,30 +57,41 @@ class TrackManager {
// Create new event with appropriate visualization style based on orbit and sound
// Create new event with appropriate visualization style based on orbit and sound
SoundEvent
event
=
createEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
SoundEvent
event
=
createEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
activeEvents
.
add
(
event
);
activeEvents
.
add
(
event
);
// Debug output to help identify events
if
(
debug
)
{
println
(
"Added event: orbit="
+
orbit
+
", sound="
+
sound
+
", gain="
+
gain
);
}
}
}
SoundEvent
createEvent
(
int
orbit
,
String
sound
,
float
gain
,
float
pan
,
float
delta
)
{
SoundEvent
createEvent
(
int
orbit
,
String
sound
,
float
gain
,
float
pan
,
float
delta
)
{
// Different visualization based on orbit (track number)
// Different visualization based on orbit (track number)
// ENHANCED: Increased default size and visibility for all event types
if
(
sound
.
contains
(
"break"
)
||
sound
.
contains
(
"jungle"
))
{
return
new
BreakbeatEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
}
switch
(
orbit
)
{
switch
(
orbit
)
{
case
0
:
// d1 - typically kick
case
0
:
// d1 - typically kick
return
new
KickEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
return
new
KickEvent
(
orbit
,
sound
,
gain
*
1.5
,
pan
,
delta
);
case
1
:
// d2 - typically snare
case
1
:
// d2 - typically snare
return
new
SnareEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
return
new
SnareEvent
(
orbit
,
sound
,
gain
*
1.5
,
pan
,
delta
);
case
2
:
// d3 - typically hats or percussion
case
2
:
// d3 - typically hats or percussion
return
new
HihatEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
return
new
HihatEvent
(
orbit
,
sound
,
gain
*
1.3
,
pan
,
delta
);
case
3
:
// d4 - typically bass
case
3
:
// d4 - typically bass
return
new
BassEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
return
new
BassEvent
(
orbit
,
sound
,
gain
*
1.5
,
pan
,
delta
);
case
7
:
// d8 - typically breaks
return
new
BreakbeatEvent
(
orbit
,
sound
,
gain
*
1.2
,
pan
,
delta
);
default
:
// Other instruments
default
:
// Other instruments
if
(
sound
.
contains
(
"suns"
)
||
sound
.
contains
(
"key"
))
{
if
(
sound
.
contains
(
"suns"
)
||
sound
.
contains
(
"key"
))
{
return
new
MelodicEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
return
new
MelodicEvent
(
orbit
,
sound
,
gain
*
1.4
,
pan
,
delta
);
}
else
if
(
sound
.
contains
(
"break"
)
||
sound
.
contains
(
"jungle"
))
{
return
new
BreakEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
}
else
if
(
sound
.
contains
(
"voice"
)
||
sound
.
contains
(
"voc"
))
{
}
else
if
(
sound
.
contains
(
"voice"
)
||
sound
.
contains
(
"voc"
))
{
return
new
VoiceEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
return
new
VoiceEvent
(
orbit
,
sound
,
gain
*
1.3
,
pan
,
delta
);
}
else
if
(
sound
.
contains
(
"riser"
)
||
sound
.
contains
(
"fx"
))
{
}
else
if
(
sound
.
contains
(
"riser"
)
||
sound
.
contains
(
"fx"
))
{
return
new
FXEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
return
new
FXEvent
(
orbit
,
sound
,
gain
*
1.5
,
pan
,
delta
);
}
else
{
}
else
{
return
new
SoundEvent
(
orbit
,
sound
,
gain
,
pan
,
delta
);
return
new
SoundEvent
(
orbit
,
sound
,
gain
*
1.4
,
pan
,
delta
);
}
}
}
}
}
}
...
@@ -119,10 +130,10 @@ class TrackManager {
...
@@ -119,10 +130,10 @@ class TrackManager {
}
}
/**
/**
* Track class
* Track class
- Improved version
*
*
* Represents a single TidalCycles track (d1-d16)
* Represents a single TidalCycles track (d1-d16)
*
Maintains state and provides visual representation
*
Enhanced visibility and layout
*/
*/
class
Track
{
class
Track
{
int
orbit
;
int
orbit
;
...
@@ -148,41 +159,42 @@ class Track {
...
@@ -148,41 +159,42 @@ class Track {
this
.
historyGain
=
new
ArrayList
<
Float
>
();
this
.
historyGain
=
new
ArrayList
<
Float
>
();
// Visual initialization
// Visual initialization
- INCREASED heights for better visibility
this
.
baseHeight
=
height
/
32.0
;
this
.
baseHeight
=
height
/
24.0
;
// Changed from 32.0
this
.
targetHeight
=
baseHeight
;
this
.
targetHeight
=
baseHeight
;
this
.
currentHeight
=
baseHeight
;
this
.
currentHeight
=
baseHeight
;
}
}
void
update
()
{
void
update
()
{
//
Decay activity over time
//
Slower decay for better visibility
activity
*=
0.9
5
;
activity
*=
0.9
7
;
// Changed from 0.95
// Update height with smooth animation
// Update height with smooth animation
currentHeight
=
lerp
(
currentHeight
,
targetHeight
,
0.2
);
currentHeight
=
lerp
(
currentHeight
,
targetHeight
,
0.2
);
// Reset target height if activity is low
// Reset target height if activity is low
if
(
activity
<
0.
1
)
{
if
(
activity
<
0.
05
)
{
// Changed from 0.1
targetHeight
=
baseHeight
;
targetHeight
=
baseHeight
;
active
=
false
;
active
=
false
;
}
}
}
}
void
display
()
{
void
display
()
{
if
(
activity
<
0.0
5
)
return
;
// Don't display inactive tracks
if
(
activity
<
0.0
2
)
return
;
// Lower threshold for visibility - Changed from 0.05
float
yPos
=
map
(
orbit
,
0
,
15
,
height
*
0.1
,
height
*
0.9
);
// Better vertical distribution - Changed from 0.1 and 0.9 to 0.05 and 0.95
float
trackWidth
=
width
*
0.8
;
float
yPos
=
map
(
orbit
,
0
,
15
,
height
*
0.05
,
height
*
0.95
);
float
xOffset
=
width
*
0.1
;
float
trackWidth
=
width
*
0.9
;
// Wider tracks - Changed from 0.8
float
xOffset
=
width
*
0.05
;
// Changed from 0.1
// Draw track background with trail effect
// Draw track background with trail effect
noStroke
();
noStroke
();
fill
(
red
(
trackColor
),
green
(
trackColor
),
blue
(
trackColor
),
activity
*
1
50
);
fill
(
red
(
trackColor
),
green
(
trackColor
),
blue
(
trackColor
),
activity
*
1
80
);
// Increased from 150
rect
(
xOffset
,
yPos
-
currentHeight
/
2
,
trackWidth
,
currentHeight
,
5
);
rect
(
xOffset
,
yPos
-
currentHeight
/
2
,
trackWidth
,
currentHeight
,
5
);
// Draw glowing edge
// Draw glowing edge
stroke
(
trackColor
,
activity
*
255
);
stroke
(
trackColor
,
activity
*
255
);
strokeWeight
(
2
);
strokeWeight
(
2
+
activity
);
// Increased from 2
noFill
();
noFill
();
rect
(
xOffset
,
yPos
-
currentHeight
/
2
,
trackWidth
,
currentHeight
,
5
);
rect
(
xOffset
,
yPos
-
currentHeight
/
2
,
trackWidth
,
currentHeight
,
5
);
...
@@ -192,16 +204,24 @@ class Track {
...
@@ -192,16 +204,24 @@ class Track {
// Draw activity meter
// Draw activity meter
float
meterWidth
=
map
(
activity
,
0
,
1
,
0
,
trackWidth
);
float
meterWidth
=
map
(
activity
,
0
,
1
,
0
,
trackWidth
);
noStroke
();
noStroke
();
fill
(
trackColor
,
activity
*
2
00
);
fill
(
trackColor
,
activity
*
2
20
);
// Increased from 200
rect
(
xOffset
,
yPos
-
currentHeight
/
3
,
meterWidth
,
currentHeight
/
3
,
5
);
rect
(
xOffset
,
yPos
-
currentHeight
/
3
,
meterWidth
,
currentHeight
/
3
,
5
);
// Add label for active tracks
if
(
activity
>
0.5
)
{
fill
(
255
,
activity
*
255
);
textAlign
(
LEFT
,
CENTER
);
textSize
(
12
);
text
(
"d"
+
(
orbit
+
1
),
xOffset
+
10
,
yPos
);
}
}
}
void
drawGlow
(
float
x
,
float
y
,
float
w
,
float
h
)
{
void
drawGlow
(
float
x
,
float
y
,
float
w
,
float
h
)
{
//
Create glow effect using multiple transparent strokes
//
Enhanced glow effect
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
float
alpha
=
map
(
i
,
0
,
4
,
activity
*
1
00
,
0
);
float
alpha
=
map
(
i
,
0
,
4
,
activity
*
1
50
,
0
);
// Increased from 100
stroke
(
red
(
trackColor
),
green
(
trackColor
),
blue
(
trackColor
),
alpha
);
stroke
(
red
(
trackColor
),
green
(
trackColor
),
blue
(
trackColor
),
alpha
);
strokeWeight
(
i
*
2
+
2
);
strokeWeight
(
i
*
2
+
3
);
// Increased from i*2+2
noFill
();
noFill
();
rect
(
x
,
y
-
currentHeight
/
2
,
w
,
currentHeight
,
5
);
rect
(
x
,
y
-
currentHeight
/
2
,
w
,
currentHeight
,
5
);
}
}
...
@@ -220,8 +240,8 @@ class Track {
...
@@ -220,8 +240,8 @@ class Track {
historyGain
.
remove
(
0
);
historyGain
.
remove
(
0
);
}
}
// Update visual properties
// Update visual properties
- MORE DRAMATIC HEIGHT CHANGE
targetHeight
=
baseHeight
+
(
gain
*
baseHeight
*
2
);
targetHeight
=
baseHeight
+
(
gain
*
baseHeight
*
4
);
// Changed from 2
}
}
boolean
isActive
()
{
boolean
isActive
()
{
...
@@ -238,7 +258,7 @@ class Track {
...
@@ -238,7 +258,7 @@ class Track {
}
}
/**
/**
* SoundEvent class
* SoundEvent class
- Improved version
*
*
* Base class for visualizing individual sound events
* Base class for visualizing individual sound events
*/
*/
...
@@ -264,16 +284,16 @@ class SoundEvent {
...
@@ -264,16 +284,16 @@ class SoundEvent {
this
.
pan
=
pan
;
this
.
pan
=
pan
;
this
.
delta
=
delta
;
this
.
delta
=
delta
;
this
.
birthTime
=
millis
();
this
.
birthTime
=
millis
();
this
.
lifespan
=
500
+
(
gain
*
500
);
// Duration based on gain
this
.
lifespan
=
800
+
(
gain
*
700
);
// Longer duration - Changed from 500
// Initialize visuals
// Initialize visuals
this
.
eventColor
=
orbitColors
[
orbit
];
this
.
eventColor
=
orbitColors
[
orbit
];
this
.
size
=
20
+
(
gain
*
60
);
this
.
size
=
30
+
(
gain
*
80
);
// Larger size - Changed from 20+(gain*60)
this
.
alpha
=
255
;
this
.
alpha
=
255
;
//
Position based on pan value
//
Better spread across the screen - Changed from width*0.3/0.7 to 0.2/0.8
float
xPos
=
map
(
pan
,
0
,
1
,
width
*
0.
3
,
width
*
0.7
);
float
xPos
=
map
(
pan
,
0
,
1
,
width
*
0.
2
,
width
*
0.8
);
float
yPos
=
map
(
orbit
,
0
,
15
,
height
*
0.
2
,
height
*
0.8
);
float
yPos
=
map
(
orbit
,
0
,
15
,
height
*
0.
1
,
height
*
0.9
);
this
.
position
=
new
PVector
(
xPos
,
yPos
);
this
.
position
=
new
PVector
(
xPos
,
yPos
);
}
}
...
@@ -281,11 +301,11 @@ class SoundEvent {
...
@@ -281,11 +301,11 @@ class SoundEvent {
// Calculate age
// Calculate age
float
age
=
millis
()
-
birthTime
;
float
age
=
millis
()
-
birthTime
;
//
Fade out as the event ages
//
Slower fade out
alpha
=
map
(
age
,
0
,
lifespan
,
255
,
0
);
alpha
=
map
(
age
,
0
,
lifespan
,
255
,
0
);
// Grow size slightly over time
// Grow size slightly over time
size
=
20
+
(
gain
*
60
)
*
(
1
+
(
age
/
lifespan
)
*
0.5
);
size
=
30
+
(
gain
*
80
)
*
(
1
+
(
age
/
lifespan
)
*
0.6
);
// Changed from 20+(gain*60)*(1+(age/lifespan)*0.5)
}
}
void
display
()
{
void
display
()
{
...
@@ -302,10 +322,10 @@ class SoundEvent {
...
@@ -302,10 +322,10 @@ class SoundEvent {
void
drawGlow
(
float
x
,
float
y
,
float
s
)
{
void
drawGlow
(
float
x
,
float
y
,
float
s
)
{
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
float
glowAlpha
=
map
(
i
,
0
,
4
,
alpha
*
0.
5
,
0
);
float
glowAlpha
=
map
(
i
,
0
,
4
,
alpha
*
0.
7
,
0
);
// Increased from 0.5
fill
(
red
(
eventColor
),
green
(
eventColor
),
blue
(
eventColor
),
glowAlpha
);
fill
(
red
(
eventColor
),
green
(
eventColor
),
blue
(
eventColor
),
glowAlpha
);
noStroke
();
noStroke
();
ellipse
(
x
,
y
,
s
+
(
i
*
1
0
),
s
+
(
i
*
10
));
ellipse
(
x
,
y
,
s
+
(
i
*
1
2
),
s
+
(
i
*
12
));
// Increased from i*10
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
viz/data/parvagues_metadata.txt
0 → 100644
View file @
7b67c9c1
# ParVagues Visualization Metadata
# Format: orbit:name:type:prop1=value1,prop2=value2,...
0:Test d1:kick
1:Test d2:snare
2:Drums:hihat
This diff is collapsed.
Click to expand it.
viz/launch.sh
View file @
7b67c9c1
#!/bin/bash
#!/bin/bash
# Direct launcher script for ParVaguesViz
# Simple launcher script for ParVaguesViz
# This uses what we've learned works on your system
# Get the full path to the sketch directory
SKETCH_DIR
=
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
)
# Colors for terminal output
# Colors for terminal output
GREEN
=
'\033[0;32m'
GREEN
=
'\033[0;32m'
BLUE
=
'\033[0;34m'
BLUE
=
'\033[0;34m'
YELLOW
=
'\033[1;33m'
YELLOW
=
'\033[1;33m'
RED
=
'\033[0;31m'
NC
=
'\033[0m'
# No Color
NC
=
'\033[0m'
# No Color
# Print banner
# Print banner
...
@@ -22,20 +19,61 @@ echo "██║ ██║ ██║██║ ██║ ╚████╔
...
@@ -22,20 +19,61 @@ echo "██║ ██║ ██║██║ ██║ ╚████╔
echo
"╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝"
echo
"╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝"
echo
-e
" TIDALCYCLES VISUALIZER
\n
${
NC
}
"
echo
-e
" TIDALCYCLES VISUALIZER
\n
${
NC
}
"
# Set Java options to fix module restrictions
# Get the full path to the sketch directory
export
_JAVA_OPTIONS
=
"--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED -Djava.awt.headless=false -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
SKETCH_DIR
=
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
)
# Check if Processing is installed
if
!
command
-v
processing &> /dev/null
&&
!
command
-v
processing-java &> /dev/null
;
then
echo
-e
"
${
RED
}
Error: Processing not found!
${
NC
}
"
echo
"Please make sure Processing is installed and in your PATH."
echo
"You can download it from: https://processing.org/download"
exit
1
fi
echo
-e
"
${
YELLOW
}
Starting ParVaguesViz...
${
NC
}
"
# Check if SuperDirt might be running
echo
-e
"
${
BLUE
}
Controls:
${
NC
}
"
if
!
command
-v
lsof &> /dev/null
||
!
lsof
-i
:57120 &> /dev/null
;
then
echo
-e
"
${
YELLOW
}
Warning: No process seems to be listening on port 57120.
${
NC
}
"
echo
"Make sure SuperDirt is running in SuperCollider before starting TidalCycles."
echo
-e
"Typical SuperCollider startup:
${
GREEN
}
SuperDirt.start
${
NC
}
"
echo
""
fi
# Print troubleshooting tips
echo
-e
"
${
YELLOW
}
Troubleshooting tips:
${
NC
}
"
echo
"1. If no visualization appears, press 'T' to generate a test pattern"
echo
"2. Debug mode is ON by default, press 'D' to toggle it"
echo
"3. Make sure SuperDirt is running on port 57120"
echo
-e
"
\n
${
BLUE
}
Controls:
${
NC
}
"
echo
" D - Toggle debug info"
echo
" D - Toggle debug info"
echo
" H - Toggle help screen"
echo
" H - Toggle help screen"
echo
" G - Change grid style"
echo
" G - Change grid style"
echo
" F - Toggle fullscreen"
echo
" F - Toggle fullscreen"
echo
" R - Reset visualization"
echo
" R - Reset visualization"
echo
" M - Toggle metadata display"
echo
" M - Toggle metadata display"
echo
echo
" T - Generate test pattern"
echo
""
# Set Java options to fix module restrictions (important for Processing 4.x)
export
_JAVA_OPTIONS
=
"--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED -Djava.awt.headless=false -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
# Launch Processing
with the full path to the main
sketch
# Launch Processing sketch
echo
-e
"
${
GREEN
}
Launching visualizer...
${
NC
}
"
echo
-e
"
${
GREEN
}
Launching visualizer...
${
NC
}
"
cd
"
$SKETCH_DIR
"
echo
"Sketch directory:
$SKETCH_DIR
"
processing
"
$SKETCH_DIR
/ParVaguesViz.pde"
# Try different launch methods
if
command
-v
processing &> /dev/null
;
then
# Preferred method: Use the Processing GUI
cd
"
$SKETCH_DIR
"
processing
"
$SKETCH_DIR
/ParVaguesViz.pde"
elif
command
-v
processing-java &> /dev/null
;
then
# Alternative: Use processing-java command line
processing-java
--sketch
=
"
$SKETCH_DIR
"
--run
else
# Last resort: Try direct Java execution
echo
-e
"
${
RED
}
Could not find Processing launcher. Trying direct execution...
${
NC
}
"
cd
"
$SKETCH_DIR
"
java
-jar
"
$SKETCH_DIR
/ParVaguesViz.jar"
fi
echo
-e
"
${
GREEN
}
Visualizer closed.
${
NC
}
"
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment