# CSV Layout Help Needed

**URL:** <https://community.mp3tag.de/t/csv-layout-help-needed/53662>\
**Category:** Support\
**Created:** [July 3, 2021, 10:54am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662 "2021-07-03T10:54:01Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![CyPha](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cypha/32/6779_2.png) [@CyPha](https://community.mp3tag.de/u/CyPha)\
**Post date:** [July 7, 2021, 9:02am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/21 "2021-07-07T09:02:47Z")

</div>

Yeah from what i can tell you're absolutely putting me on the right path, i'm just slow to understand it all. I thank you for taking the time to explain things further. I'll try something other than the square brackets, i think they might be hiding as nothing inside them is really triggering them, is my guess.  
I'll keep fiddling 🙂

---

<div class="post-metadata">

**Author:** ![CyPha](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cypha/32/6779_2.png) [@CyPha](https://community.mp3tag.de/u/CyPha)\
**Post date:** [July 7, 2021, 9:47am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/22 "2021-07-07T09:47:32Z")

</div>

> [@ohrenkino](#):
>
> $get really only reads the variable.

Now i'm really confused.  
Because this has no issue showing something with a basic get, doesnt it?

```auto
$repeat($char(9),4)Submitted: %_datetime%$char(9)$puts(TRUESEC,$div(%_total_time_raw%,4))$puts(SECONDS,$mod($get(TRUESEC),60))$puts(TMS,$sub($get(TRUESEC),$get(SECONDS)))$puts(MINUTES,$mod(%div($sub($get(TRUESEC),$get(SECONDS)),60),60))$puts(HOURS,$mod($div($div($sub($get(TMS),$mul($get(MINUTES),60)),60),60),24))$puts(DAYS,$div($div($div($sub($get(TMS),$mul($get(MINUTES),60),$mul($get(HOURS),60),60),60),60),24))$get(R5)Total [$get(DAYS)d]$get(HOURS):$get(SECONDS):$num($get(MINUTES),2)$char(9)%_total_size%

```

```auto
Submitted: 7/07/2021 7:42:05 PM	Total 1:23:00	660.18 MB

```

yeah seems i can pull/show it with just the get now that the word is in front of the variables of all the puts, however the only results i can get are CV or something like [V /V |V or whatever else i set the first character of the very first $puts(stems,x x x x x x x x)

---

<div class="post-metadata">

**Author:** ![CyPha](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cypha/32/6779_2.png) [@CyPha](https://community.mp3tag.de/u/CyPha)\
**Post date:** [July 7, 2021, 10:19am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/23 "2021-07-07T10:19:42Z")

</div>

I'm getting closer, i just have to work out why they're all returning the same result now

```auto
Bloc Party
	Intimacy
		Mercury Stems: zCzDzGzIzKzRzSzVz
		One Month Off Stems: zCzDzGzIzKzRzSzVz

CKY
	Infiltrate Destroy Rebuild
		Escape From Hellview Stems: zCzDzGzIzKzRzSzVz
		Shock and Terror Stems: zCzDzGzIzKzRzSzVz
	Volume 1
		96 Quite Bitter Beings Stems: zCzDzGzIzKzRzSzVz
		Sara's Mask Stems: zCzDzGzIzKzRzSzVz

Flymore
	Millenium IV V
		Intro Stems: zCzDzGzIzKzRzSzVz
		Misunderstanding Stems: zCzDzGzIzKzRzSzVz
		Wake Up Stems: zCzDzGzIzKzRzSzVz
		All The Time I Bled Stems: zCzDzGzIzKzRzSzVz
		My Last Goodbye Stems: zCzDzGzIzKzRzSzVz
		I Will Still Sing Stems: zCzDzGzIzKzRzSzVz
		Queen of the Damned Stems: zCzDzGzIzKzRzSzVz
		Nothing Personal Stems: zCzDzGzIzKzRzSzVz
		Insane Stems: zCzDzGzIzKzRzSzVz
		Hold On Stems: zCzDzGzIzKzRzSzVz
		Live It Up Stems: zCzDzGzIzKzRzSzVz
		My Destination Stems: zCzDzGzIzKzRzSzVz
		Asylum Stems: zCzDzGzIzKzRzSzVz
		All The Time I Bled Remix Stems: zCzDzGzIzKzRzSzVz

Groove Armada
	The Best of Groove Armada
		Think Twice Stems: zCzDzGzIzKzRzSzVz

```

```auto
$loop(%artist%,1)%artist%
$loop(%album%,1)$char(9)%album%
$loop(%track%,1)$char(9)$char(9)%title%$char(9)$char(9)Stems: $loop(%_workingdir%,1)$puts(STEMS,zXzXzXzXzXzXzXzXz)	$if($eql(%_filename,Crowd),$puts(STEMS,$left($get(STEMS),1)C$mid($get(STEMS),3,15)),)	$if($eql(%_filename,Drums),$puts(STEMS,$left($get(STEMS),3)D$mid($get(STEMS),5,13)),)	$if($eql(%_filename,Guitar),$puts(STEMS,$left($get(STEMS),5)G$mid($get(STEMS),7,11)),)	$if($eql(%_filename,Instrumental),$puts(STEMS,$left($get(STEMS),7)I$mid($get(STEMS),9,9)),)	$if($eql(%_filename,Keys),$puts(STEMS,$left($get(STEMS),9)K$mid($get(STEMS),11,7)),)	$if($eql(%_filename,Rhythm),$puts(STEMS,$left($get(STEMS),11)R$mid($get(STEMS),13,5)),)	$if($eql(%_filename,Song),$puts(STEMS,$left($get(STEMS),13)S$mid($get(STEMS),15,3)),)	$if($eql(%_filename,Vocals),$puts(STEMS,$left($get(STEMS),15)V$mid($get(STEMS),17,1)),)$get(STEMS)$loopend()
$loopend()$loopend()

$loopend()

```

---

<div class="post-metadata">

**Author:** ![CyPha](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cypha/32/6779_2.png) [@CyPha](https://community.mp3tag.de/u/CyPha)\
**Post date:** [July 7, 2021, 11:06am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/24 "2021-07-07T11:06:44Z")

</div>

I'm out of ideas, haha, no matter what i try, no matter where i put the end brackets or the commas for the IF lines.. on a rotation of the same results, if i take the 1 off the second %workingpath%, it just repeats that whole zCzDzGzIzKzRzSzVz result as many times as files in a dir

I tried to put in code for what happens on the OR or NOT parts of the IF lines (after the final commas), telling it to keep an X instead of the stems respective letter it would have placed if it found that stem, and all that did was give me zXzXzXzXzXzXzXzXz at the end as if it never found anything. its just not working for me, starting to feel like im making it worse

```auto
$loop(%artist%,1)%artist%
$loop(%album%,1)$char(9)%album%
$loop(%track%,1)$char(9)$char(9)%title%$char(9)$char(9)Stems:$loop(%_workingpath%)$loopend() %_max_counter% $loop(%_workingpath%,1)%_max_counter%$puts(STEMS,zXzXzXzXzXzXzXzXz)$if($eql(%_filename,Crowd),$puts(STEMS,$left($get(STEMS),1)C$mid($get(STEMS),3,15))
$if($eql(%_filename,Drums),$puts(STEMS,$left($get(STEMS),3)D$mid($get(STEMS),5,13))
$if($eql(%_filename,Guitar),$puts(STEMS,$left($get(STEMS),5)G$mid($get(STEMS),7,11))
$if($eql(%_filename,Instrumental),$puts(STEMS,$left($get(STEMS),7)I$mid($get(STEMS),9,9))
$if($eql(%_filename,Keys),$puts(STEMS,$left($get(STEMS),9)K$mid($get(STEMS),11,7))
$if($eql(%_filename,Rhythm),$puts(STEMS,$left($get(STEMS),11)R$mid($get(STEMS),13,5))
$if($eql(%_filename,Song),$puts(STEMS,$left($get(STEMS),13)S$mid($get(STEMS),15,3))
$if($eql(%_filename,Vocals),$puts(STEMS,$left($get(STEMS),15)V$mid($get(STEMS),17,1))),),),),),),),)$get(STEMS)$loopend()
$loopend()$loopend()

$loopend()

```

```auto
Bloc Party
	Intimacy
		Mercury Stems: 4 zCzDzGzIzKzRzSzVz
		One Month Off Stems: 4 zCzDzGzIzKzRzSzVz

CKY
	Infiltrate Destroy Rebuild
		Escape From Hellview Stems: 4 zCzDzGzIzKzRzSzVz
		Shock and Terror Stems: 4 zCzDzGzIzKzRzSzVz
	Volume 1
		96 Quite Bitter Beings Stems: 4 zCzDzGzIzKzRzSzVz
		Sara's Mask Stems: 4 zCzDzGzIzKzRzSzVz

```

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [July 7, 2021, 2:57pm UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/25 "2021-07-07T14:57:55Z")

</div>

> [@CyPha](#):
>
> `eql(%_filename,Guitar`

If this is a copy of the original script then you forgot the closing % for %\_filename% a couple of time. So probably the comparison never finds a match.

---

<div class="post-metadata">

**Author:** ![CyPha](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cypha/32/6779_2.png) [@CyPha](https://community.mp3tag.de/u/CyPha)\
**Post date:** [July 8, 2021, 5:02am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/26 "2021-07-08T05:02:03Z")

</div>

Ah yes, silly mistake of mine, it didn't fix the problem, but i've been playing around some more and this is seems really close, it is at least returning results based on Crowd presence atm, My Last Goodbye and Think Twice both show YC where all others show ZC  
i've found this through fluke, trial and error, so i have to keep working at it

```auto
$loop(%artist%,1)%artist%
$loop(%album%,1)$char(9)%album%
$loop(%track%,1)$char(9)$char(9)%title%$char(9)$char(9)Stems:$loop(%_workingpath%)$loopend() %_max_counter% $loop(%_workingpath%,10)%_max_counter%$puts(STEMS0,--------)	$if($eql(%_filename%,Crowd),$puts(STEMSa,C$mid($get(STEMS0),2,7))	$if($eql(%_filename%,Drums),$puts(STEMSb,$left($get(STEMSa),3)D$mid($get(STEMS0),3,6))	$if($eql(%_filename%,Guitar),$puts(STEMSc,$left($get(STEMSb),5)G$mid($get(STEMS0),4,5))	$if($eql(%_filename%,Instrumental),$puts(STEMSd,$left($get(STEMSc),7)I$mid($get(STEMS0),5,4))	$if($eql(%_filename%,Keys),$puts(STEMSe,$left($get(STEMSd),9)K$mid($get(STEMS0),6,3))	$if($eql(%_filename%,Rhythm),$puts(STEMSf,$left($get(STEMSe),11)R$mid($get(STEMS0),7,2))	$if($eql(%_filename%,Song),$puts(STEMSg,$left($get(STEMSf),13)S$mid($get(STEMS0),8,1))	$if($eql(%_filename%,Vocals),$puts(STEMSh,$left($get(STEMSg),7)V),X),),),),),),Y),Z)$get(STEMSa)$loopend()
$loopend()$loopend()

$loopend()

```

```auto
Bloc Party
	Intimacy
		Mercury Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------
		One Month Off Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------

CKY
	Infiltrate Destroy Rebuild
		Escape From Hellview Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------
		Shock and Terror Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------
	Volume 1
		96 Quite Bitter Beings Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------
		Sara's Mask Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------

Flymore
	Millenium IV V
		Intro Stems: 3 ZC-------	ZC-------	ZC-------
		Misunderstanding Stems: 3 ZC-------	ZC-------	ZC-------
		Wake Up Stems: 3 ZC-------	ZC-------	ZC-------
		All The Time I Bled Stems: 3 ZC-------	ZC-------	ZC-------
		My Last Goodbye Stems: 8 YC-------	ZC-------	ZC-------	ZC-------	ZC-------	ZC-------	ZC-------	ZC-------
		I Will Still Sing Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------
		Queen of the Damned Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------
		Nothing Personal Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------
		Insane Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------
		Hold On Stems: 3 ZC-------	ZC-------	ZC-------
		Live It Up Stems: 3 ZC-------	ZC-------	ZC-------
		My Destination Stems: 3 ZC-------	ZC-------	ZC-------
		Asylum Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------
		All The Time I Bled Remix Stems: 4 ZC-------	ZC-------	ZC-------	ZC-------

Groove Armada
	The Best of Groove Armada
		Think Twice Stems: 6 YC-------	ZC-------	ZC-------	ZC-------	ZC-------	ZC-------

```

---

<div class="post-metadata">

**Author:** ![CyPha](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cypha/32/6779_2.png) [@CyPha](https://community.mp3tag.de/u/CyPha)\
**Post date:** [July 8, 2021, 7:59am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/27 "2021-07-08T07:59:07Z")

</div>

I'm still not sure what's going on

```auto
$loop(%artist%,1)%artist%
$loop(%album%,1)$char(9)%album%
$loop(%track%,1)$char(9)$char(9)%title%$char(9)$char(9)Stems:$loop(%_workingpath%)$loopend() %_max_counter% $loop(%_workingpath%,2)%_max_counter%$puts(STEMS0,-c-d-g-i-k-r-s-v)	$if($eql(%_filename%,Crowd),$puts(STEMSa,C$mid($get(STEMS0),3,14)),NC)	$if($eql(%_filename%,Drums),$puts(STEMSb,$left($get(STEMSa),2)D$mid($get(STEMS0),5,12)),ND)	$if($eql(%_filename%,Guitar),$puts(STEMSc,$left($get(STEMSb),4)G$mid($get(STEMS0),7,10)),NG)	$if($eql(%_filename%,Instrumental),$puts(STEMSd,$left($get(STEMSc),6)I$mid($get(STEMS0),9,8)),NI)	$if($eql(%_filename%,Keys),$puts(STEMSe,$left($get(STEMSd),8)K$mid($get(STEMS0),11,6)),NK)	$if($eql(%_filename%,Rhythm),$puts(STEMSf,$left($get(STEMSe),10)R$mid($get(STEMS0),13,4)),NR)	$if($eql(%_filename%,Song),$puts(STEMSg,$left($get(STEMSf),12)S$mid($get(STEMS0),15,2)),NS)	$if($eql(%_filename%,Vocals),$puts(STEMSh,$left($get(STEMSg),14)V),NV)$loopend()$get(STEMSh)
$loopend()$loopend()

$loopend()

```

I can't work out why one part of the same line is finding the stems, but the other part is finding something that isn't there..

```auto
Bloc Party
	Intimacy
		Mercury Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
		One Month Off Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V

CKY
	Infiltrate Destroy Rebuild
		Escape From Hellview Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
		Shock and Terror Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
	Volume 1
		96 Quite Bitter Beings Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
		Sara's Mask Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V

Flymore
	Millenium IV V
		Intro Stems: 3 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK	NR C-D-G-I-K-R-S-V
		Misunderstanding Stems: 3 NC	ND	NG	NI	NK NS NC	ND	NG	NI	NK	NR C-D-G-I-K-R-S-V
		Wake Up Stems: 3 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
		All The Time I Bled Stems: 3 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
		My Last Goodbye Stems: 8 ND	NG	NI	NK	NR	NS NC NG	NI	NK	NR	NS	C-D-G-I-K-R-S-V
		I Will Still Sing Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
		Queen of the Damned Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
		Nothing Personal Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
		Insane Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
		Hold On Stems: 3 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK	NR C-D-G-I-K-R-S-V
		Live It Up Stems: 3 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK	NR C-D-G-I-K-R-S-V
		My Destination Stems: 3 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK	NR C-D-G-I-K-R-S-V
		Asylum Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V
		All The Time I Bled Remix Stems: 4 NC NG	NI	NK	NR	NS NC	ND	NG	NI	NK NS	C-D-G-I-K-R-S-V

Groove Armada
	The Best of Groove Armada
		Think Twice Stems: 6 ND	NG	NI	NK	NR	NS NC NG	NI	NK	NR	NS	C-D-G-I-K-R-S-V

```

After each listed song is 2 loops, set to avoid repetition for now, the first loop finds whatever the first stem present in a folder is, the second loop does the same for the second alphabetical file present, the N\*s' are coming up from the OTHERWISE parts of the IF lines, showing that the first stem was not the other parts and that the only part found was the one that didnt return a negative or "otherwise". (NV from the Vocals If line also doesn't show because i forgot to put it in before export).

What i still don't understand is why the first parts of the IF lines are changing the STEMA-H's when they're not finding anything, most of those folders do not have crowd in them, the code didn't find it, it found Drums on most of them first, as seen above, but yet that C in C-D-G-I-K-R-S-V is still turned capital..

I'd also ran a line though with all the stages of the STEMS A-H being pulled one at a time  
this was what it looked like with just A D and H `A:C-d-g-i-k-r-s-v D:C-D-G-I-k-r-s-v H:C-D-G-I-K-R-S-V` so to me that was working, going through the stages and replacing the letters, but currently at the wrong times. or am i just using a get to pull the wrong letter (h), should it all come to one more puts before i pull/get it?

I just tried putting some lines in for the OTHERWISE parts of the IF lines and all that does is replace whatever the first half is doing, it doesn't seem to me like these puts care about if the IFs allow them or not, they just do what they want and replace each puts before it.  
Making the drum line `$if($eql(%_filename%,Drums),$puts(STEMSb,$left($get(STEMSa),2)D$mid($get(STEMS0),5,12)),$puts(STEMSb,$left($get(STEMSa),2)d$mid($get(STEMS0),5,12)))` results in C-d-G-I-K-R-S-V, on songs that HAVE drums.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [July 8, 2021, 8:34am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/28 "2021-07-08T08:34:24Z")

</div>

To be honest, I can't follow you.  
Why do you create so many STEMS strings if the original idea was to replace a preset value in the first initialized string?  
And then somehow I miss the instruction to output the string with the replaced values - right now it looks like you get the output only from the FALSE end of the $if() statement.

---

<div class="post-metadata">

**Author:** ![CyPha](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cypha/32/6779_2.png) [@CyPha](https://community.mp3tag.de/u/CyPha)\
**Post date:** [July 8, 2021, 8:56am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/29 "2021-07-08T08:56:38Z")

</div>

> [@ohrenkino](#):
>
> Why do you create so many STEMS strings if the original idea was to replace a preset value in the first initialized string?

It was a test at first, i've got another line of puts i've being using as a guide and it doesn't replace itself many many times, and being that the first efforts were getting me nowhere, i tried something else.  
To be honest i can't follow me either, but i certainly can't follow the logic mp3tag uses either, i've written codes like this before, i've written stuff that is way more complex, but this doesn't wanna work any way i've discovered.

Maybe i need to start over  
I just need to be able to make mp3tag look through any given folder a set number of times, with a set number of titles to look for, stating once and only once which ones it finds when looking, and which ones it doesn't find. i need that to be stated after every song's title is mentioned in the extract.

The closest i think ive come is this  
Say i set every If line with a number for the negative returns, 1 for crowd, 2 for drums so on, the script will look through the directory, on the times where it finds a Crowd, it will say Crowd, or if not it will say 1, then the same for Drums, either Drums or 2, i end up with lines like this  
1Drums12345Rhythm123456Song1234567Vocals  
So it would return negatives until it found a positive, then it would run through that list again, but return negatives for the same ones that aren't in the directory again, the only upside is that it doesn't return a positive on the same file it had only just found prior

I tried a lot of stuff and just kept getting the same results, i might have to look at something else. setting up a status panel should not be so hard.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [July 8, 2021, 9:08am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/30 "2021-07-08T09:08:09Z")

</div>

> [@CyPha](#):
>
> stating once and only once which ones it finds when looking, and which ones it doesn't find

this means that you have to count the occurrances somewhere and stop when it goes beyond 1.  
You have not yet solved the problem of "it doesn't find" - if you compare the filename Vocals.ogg" with "does it equal "Song" then "Song is not there.  
So you need some kind of reference which you can compare the current finding against. Just like you are a teacher in a new class where you need a list of pupils' names to find out which one is there and which isn't. If you don't have that list then you will never know if you got the complete class and you will never know if a "John" was supposed to be there.  
I cannot say how many loops you need - if you first loop through the tracks and then through the stem files, I think you need at least 2 of them. and then probably one for the album...  
But right now it would be best if you got one example with just one stem running, then add one after the other and see if the result is convincing.  
I am afraid I can't help you any further as I do not have the same test environment as you (and I am not willing to create it).

---

<div class="post-metadata">

**Author:** ![CyPha](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cypha/32/6779_2.png) [@CyPha](https://community.mp3tag.de/u/CyPha)\
**Post date:** [July 8, 2021, 9:33am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/31 "2021-07-08T09:33:53Z")

</div>

Yeah, i understand what you're saying, i thought that's what this code did

```auto
$loop(%_workingpath%)%_max_counter%$puts(STEMS0,-c-d-g-i-k-r-s-v)	$if($eql(%_filename%,Crowd),$puts(STEMSa,C$mid($get(STEMS0),3,14)),)	$if($eql(%_filename%,Drums),$puts(STEMSb,$left($get(STEMSa),2)D$mid($get(STEMS0),5,12))	$if($eql(%_filename%,Guitar),$puts(STEMSc,$left($get(STEMSb),4)G$mid($get(STEMS0),7,10))	$if($eql(%_filename%,Instrumental),$puts(STEMSd,$left($get(STEMSc),6)I$mid($get(STEMS0),9,8))	$if($eql(%_filename%,Keys),$puts(STEMSe,$left($get(STEMSd),8)K$mid($get(STEMS0),11,6))	$if($eql(%_filename%,Rhythm),$puts(STEMSf,$left($get(STEMSe),10)R$mid($get(STEMS0),13,4))	$if($eql(%_filename%,Song),$puts(STEMSg,$left($get(STEMSf),12)S$mid($get(STEMS0),15,2))	$if($eql(%_filename%,Vocals),$puts(STEMSh,$left($get(STEMSg),14)V),)$loopend()

```

or one of the many variations of it, moving commas, brackets, i thought this was the comparison list it would need. that's okay, i'll find another way. thanks for your efforts

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [July 8, 2021, 9:41am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/32 "2021-07-08T09:41:52Z")

</div>

The code that you wrote assigns the new finding to a new string which never is output.  
So there is no place to remember that there was already a hit.  
all the Stems{a-h} should be stems0 - the "false" section of the $if() should stay empty as you to not really want to see that the match is not there in 7 out 8 cases. The match is noted in STEMS0.  
STEMS0 also shows where there was not hit at all as that letter then stays in lower case (if that is the way you want it).  
When all the $if()s are through you would have to read the next filename and process all the $ifs() again and after the last file you show what STEMS0 looks like now.  
And then you load the next track, initialize STEMS0 with the string that shows only the missing bits and start filling it with the $ifs()

---

<div class="post-metadata">

**Author:** ![CyPha](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cypha/32/6779_2.png) [@CyPha](https://community.mp3tag.de/u/CyPha)\
**Post date:** [July 10, 2021, 10:03am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/33 "2021-07-10T10:03:24Z")

</div>

Got it working exactly how i want it. this program made it anything but easy, as did bothering with puts or gets.

```auto
$filename(csv,utf-8)$loop($if2(%albumartist%,%artist%))$if2(%albumartist%,%artist%)$repeat($char(9),2)$loop(%year%)$loop(%album%)$loop(%discnumber%)$loop(%album_version%)
$char(9)$if2(%year%,%date%)$char(9)$upper(%album%)['('%album_version%')']$char(9)%_total_size%$char(9)
$loop(%track%,1)$char(9)$num(%track%,2)$char(9)%title%['['%track_version%']']$char(9)%_length% | %_total_size%[| %bpm% BPM]$char(9)$loop(%title%,)$if($eql(%_filename%,Crowd),C,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Drums),D,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Guitar),G,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Instrumental),I,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Keys),K,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Rhythm),R,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Song),S,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Vocals),V,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Drums_1),D1,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Drums_2),D2,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Drums_3),D3,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Drums_4),D4,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Vocals_1),V1,_)$loopend()$char(9)$loop(%title%,)$if($eql(%_filename%,Vocals_2),$puts(STEMFOUND,YES)V2,$puts(STEMFOUND,NO)_)$loopend()$char(9)[does collection have INI files present, place YES or NO after ANSWER',']$puts(ANSWER,YES)$if($eql($get(ANSWER),YES),$char(9745),$char(9746))$char(9)$loop(%title%,)$if($eql($get(STEMFOUND),YES),,$if($eql(%_filename%,Crowd),,$if($eql(%_filename%,Drums),,$if($eql(%_filename%,Guitar),,$if($eql(%_filename%,Instrumental),,$if($eql(%_filename%,Keys),,$if($eql(%_filename%,Rhythm),,$if($eql(%_filename%,Song),,$if($eql(%_filename%,Vocals),,$if($eql(%_filename%,Drums_1),,$if($eql(%_filename%,Drums_2),,$if($eql(%_filename%,Drums_3),,$if($eql(%_filename%,Drums_4),,$if($eql(%_filename%,Vocals_1),,$if($eql(%_filename%,Vocals_2),,%_filename%',' )))))))))))))))$loopend()
$loopend()$loopend()$loopend()$loopend()
$loopend()

$loopend()

```

there is a manual input YES or NO i could do something more about later on, but for my personal use, it's fine, something i won't need to swap around that often anyway.

```auto

B.o.B		
	2010	THE ADVENTURES OF BOBBY RAY	185.58 MB	
	01	Dont Let Me Fall	04:35 | 14.96 MB | 75 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	02	Nothin' On You	04:28 | 14.83 MB | 104 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	03	Past My Shades	03:35 | 11.85 MB | 189 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	04	Airplanes	02:58 | 8.88 MB | 93 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	05	Bet I	04:17 | 14.51 MB | 89 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	06	Ghost In The Machine	05:00 | 12.19 MB | 80 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	07	The Kids	03:40 | 12.44 MB | 139 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	08	Magic	03:12 | 11.74 MB | 82 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	09	Fame	04:06 | 12.36 MB | 94 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	10	Lovelier Than You	04:06 | 10.12 MB | 77 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	12	Airplanes, Pt. II	05:18 | 14.44 MB | 98 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	13	Higher	04:04 | 12.92 MB | 129 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	14	Satellite	04:03 | 11.63 MB | 75 BPM	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	15	Letters From Vietnam	04:13 | 11.55 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	16	I See Ya	03:19 | 11.16 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	

	2015	PSYCADELIK THOUGHTZ	347.10 MB	
	01	Psycadelik Thoughtz	03:40 | 50.03 MB	C _____	_D____	 ______	__ I ___	______	 ___R__	 ____S_	_____ V	______	______	 ______	______	 ______	______	☑	
	02	Violence	02:27 | 20.10 MB	_______	D______	 _______	_______	 _______	__ R ____	___ S ___	_____ V_	_______	_______	 _______	_______	 _______	_______	☑	Megaphone Vocals (fake for test), Synths (fft), Xylophone (fft), 
	03	Confucius	03:27 | 32.43 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	04	Back and Forth	03:44 | 32.32 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	05	Plain Jane	03:01 | 22.16 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	06	Hourglass	03:48 | 33.39 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	07	Violet Vibrato	04:55 | 36.68 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	08	Up	04:34 | 32.91 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	09	Joburg	03:48 | 29.39 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	10	Love Life (feat. Sevyn Streeter)	03:37 | 27.93 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	
	11	Have Nots	03:34 | 29.76 MB	____	D___	 ____	____	 ____	_R__	 __S_	___ V	____	____	 ____	____	 ____	____	☑	

```

There was probably a few ways to do it in the end, but i wasn't about to start fixing what wasn't broke after this method started to show its worth. all present stems show, all the ones that are not present at least have a loop looking for them and returning an underscore and another separate block of \_\_\_\_\_, meaning all the columns have something to read, and then after that there is just another set of loops looking for any other files not in the 14 predefined names, but then also excluding those 14 from being named again.  
you can see some of this in B.O.B's second album shown.

---

<div class="post-metadata">

**Author:** ![CyPha](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cypha/32/6779_2.png) [@CyPha](https://community.mp3tag.de/u/CyPha)\
**Post date:** [July 10, 2021, 10:05am UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/34 "2021-07-10T10:05:21Z")

</div>

> **[DIY-Stems-jul9-21](https://docs.google.com/spreadsheets/d/1MCP1g_20wboXZLO8-JHtm4j0AKhVNrA26I90tFpSfKo/edit?usp=sharing)**
>
> Sheet1
> 
> D.I.Y Multi-Track/Stems Collection - 2021,Crowd,Drums Mix,Guitar,Instrumental,Keys \\ Synths,Rhythm \\ Bass,Song \\ Other,Vocals Mix,Drums 1,Drums 2,Drums 3,Drums 4,Vocals 1,Vocals 2
> ARTIST,YEAR,ALBUM | TRACK,LENGTH | SIZE |...

> **[Clean Stem Status](https://docs.google.com/spreadsheets/d/19RUTpNwEieffsvS2VimReKRhS05kT9uYLT8Ds1pZAdI/edit?usp=sharing)**
>
> 2019/2020
> 
> M,U,L,T,I,-,T,R,A,C,K,S
> STEM ISOLATION PROGRESS STATUS,Crowd,Drums,Guitar,Instru~,Keys,Rhythm,Other,Vocals,Drums 1,Drums 2,Drums 3,Drums 4,Vocals 1,Vocals 2
> ARTIST,ALBUM | TRACK,DETAILS,C,D,G,I,K,R,S,V,D1,D2,D3,D4,V1,V2,INI,EXTRAS
> A...

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [February 9, 2026, 12:29pm UTC](https://community.mp3tag.de/t/csv-layout-help-needed/53662/35 "2026-02-09T12:29:18Z")

</div>



[Previous page](https://community.mp3tag.de/t/csv-layout-help-needed/53662.md?page=1)
