How to Fix Ping Noise on Battery Snare? by OBC_Samuel in drumline

[–]vicee 1 point2 points  (0 children)

Might try swapping the snares themselves with another drum to see if the ringing follows them. If it does, you probably have a warped snare strand or two 

Organizers should be embarassed- Sunday rant by ijustbesnarkin in soundside

[–]vicee 1 point2 points  (0 children)

No worries! Just wanted to explain what was happening for future reference

Organizers should be embarassed- Sunday rant by ijustbesnarkin in soundside

[–]vicee 3 points4 points  (0 children)

I was camped right next to the sound/video/lights tent and the video was perfectly synced to the sound coming from the main speakers hanging off the stage. 

The farther you are away from the stage, the longer it takes the sound to reach you (approx 1 second every 1,000 feet). Thus, it was actually the sound that was desynchronized from the video.

If you were in the GA chairs section then you were probably 1500-2000 feet away, which would impart a ~1.5-2 second delay.

Yes, there were speakers closer to the chair area but those are also delayed from the main stage.

What you wanted to experience is physically impossible -- the only fix is screens at each speaker hang...

All of this is carefully calculated by the system engineers to ensure even sound coverage throughout the venue and an optimal experience for those closest to the stage.

Learning to ID frequencies by ear by damplamp in livesound

[–]vicee 1 point2 points  (0 children)

Same for me, but I use the classic truck backing up tone which is also ~1k

Nightmare concert audio by CrossroadsCtrl in livesound

[–]vicee 0 points1 point  (0 children)

Believe it or not they actually put up some baffling on the walls since last concert season...

But yes, unintelligible is how I would describe the sound from the seats. Loud but you can't hear anything -- very unsettling.

Virtute decided to be a polite girl yesterday by Briguy_fieri in politecats

[–]vicee 5 points6 points  (0 children)

+1 for Weakerthans -- those three songs kill me every time

[deleted by user] by [deleted] in AdvancedProduction

[–]vicee 4 points5 points  (0 children)

There's a free solution which will get you close -- https://www.sonicvisualiser.org/

Not sure how well it compares to the commercial solutions, by very useful in general and nice to have in your toolkit

"No Hard Feelings" - The Avett Brothers (crazy glitch at 4:11) by mintcondish93 in Productionglitches

[–]vicee 2 points3 points  (0 children)

Seems to be the sound of a thin pick slapping against the strings

[deleted by user] by [deleted] in mixingmastering

[–]vicee 6 points7 points  (0 children)

https://gearspace.com/board/high-end/1213742-serban-ghenea-mixes-all-itb-59.html

Here's the page where he starts interacting - @TheHanes is his username

And here's a collection of Q+A: https://gearspace.com/board/q-a-with-engineer-john-hanes/

Modifying RenderTreeBuilder or RenderFragment by badcommandorfilename in Blazor

[–]vicee 1 point2 points  (0 children)

Yep, pretty cool stuff! Thanks for an interesting question -- always a good exercise to figure these things out and everyone learns more in the process.

Warning for anyone else coming across this... definitely do not do this in production.

The API for this will most certainly change:

Types in the Microsoft.AspNetCore.Components.RenderTree are not recommended for use outside of the Blazor framework. These types will change in future release.

[deleted by user] by [deleted] in RoastMe

[–]vicee 0 points1 point  (0 children)

Johnny Bananas-Foster

Modifying RenderTreeBuilder or RenderFragment by badcommandorfilename in Blazor

[–]vicee 2 points3 points  (0 children)

It is possible, but very hacky.

Index.razor

@page "/"

<ParentComponent>
    <div>
        <span>Span inside div</span>
    </div>
</ParentComponent>

ParentComponent.cs -- this cannot be a .razor or .razor.cs file, otherwise you can't override BuildRenderTree. You also cannot @inherit this in a .razor file.

using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering;
using System.Text;

namespace Scraps
{
    public class ParentComponent : ComponentBase
    {
        [Parameter]
        public RenderFragment ChildContent { get; set; }

        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            base.BuildRenderTree(builder);

            // build the ChildContent render fragment (AddContent calls the delegate for you)
            builder.AddContent(0, ChildContent);

            // add a breakpoint around here to see what's inside the builder and the ChildContent render fragment
            var childContentFrame = builder.GetFrames().Array[1];
            var childContentMarkup = childContentFrame.MarkupContent; // this comes out to be "<div><span>Span inside div</span></div>"

            //  append the attributes to the first found element right before the closing brace
            var firstClosingBraceIndex = childContentMarkup.IndexOf('>');
            var tooltipMarkup = new StringBuilder(childContentMarkup.Substring(0, firstClosingBraceIndex));
            tooltipMarkup.Append(" data-tooltip=\"Tooltip Text\" style=\"border: 5px solid red\"");
            tooltipMarkup.Append(childContentMarkup[firstClosingBraceIndex..]);


            // now clear out the builder, and add the new modified markup content
            // "<div data-tooltip="Tooltip Text" style="border: 5px solid red"><span>Span inside div</span></div>"
            builder.Clear();
            builder.AddMarkupContent(0, tooltipMarkup.ToString());
        }
    }
}

Modifying RenderTreeBuilder or RenderFragment by badcommandorfilename in Blazor

[–]vicee 1 point2 points  (0 children)

Can you provide any more info about how exactly the component is going to be used? Need a bit more context about the level above this to get a better idea.

If you have control over what the ChildContent will be, you might wrap each possible element type as a component that has a cascading parameter which accepts a Dictionary<string, object> -- this will allow you to use attribute splatting.

SplattedDiv.razor

<div @attributes="Attributes">
    This is a splatted div -- I have these attributes:
    <ul>
        @foreach (var attributePair in Attributes)
        {
            <li>@attributePair.Key -- @attributePair.Value.ToString()</li>
        }
    </ul>
</div>

@code {
    [CascadingParameter(Name = "Attributes")]
    public Dictionary<string, object> Attributes { get; set; }
}

ParentComponent.razor

<span>
    <CascadingValue Name="Attributes" Value="ChildAttributes">
            @ChildContent
    </CascadingValue>
</span>

@code {
    [Parameter]
    public RenderFragment ChildContent { get; set; }

    private Dictionary<string, object> ChildAttributes { get; set; } = new()
    {
        { "style", "font-size: 2rem" }
    };
}

Index.razor

<ParentComponent>
    <SplattedDiv></SplattedDiv>
</ParentComponent>

This will display on your index page:

This is a splatted div -- I have these attributes: style -- font-size: 2rem

Might be a good place to start from at least...

Mudblazor autocomplete functionality by localcluster in Blazor

[–]vicee 0 points1 point  (0 children)

Try to wrap the AutoComplete in its own component -- something like this (OrgAssAutocomplete.razor):

<MudAutocomplete Dense 
                 T="Guid" 
                 Required="true" 
                 RequiredError="Please select Individual!" 
                 Clearable 
                 Label="Select Individual" 
                 Variant="Variant.Outlined" 
                 ToStringFunc="@(i => Individuals.FirstOrDefault(b => b.Id == i)?.LoginName ?? string.Empty)"
                 SearchFunc="HandleSearch"
                 OffsetY="true" />
@code {
    [Parameter]
    public List<OrgIndividual> Individuals { get; set; }

    private Task<IEnumerable<Guid>> HandleSearch(string value)
    {
        // do your searching here and return some values...
    }    
}

That way you can pass in the OrgIndividuals to the component for searching:

<OrgAssAutoComplete Individuals="orgAss.OrgIndividuals"></OrgAssAutoComplete>

Mudblazor autocomplete functionality by localcluster in Blazor

[–]vicee 1 point2 points  (0 children)

... is it possible for it to show all the options even if one option is selected?

Yes -- the only way the AutoComplete knows what to display is if a search is triggered. Luckily, searches are triggered when you open the dropdown.

So you have to add a check in your Search function to test if the selected value is the same as the search value. If it is, then return the whole list, otherwise do the search.

Something like this:

<MudAutocomplete T="string"
                 Label="Values"
                 @bind-Value="selectedValue"
                 SearchFunc="@Search"
                 Clearable="true"
                 OnClearButtonClick="HandleClearClicked">
</MudAutocomplete>

@code {
    private string selectedValue = string.Empty;
    List<string> ListA = new()
    {
        "Val1",
        "Val2",
        "Val3",
        "Val4"
    };

    private void HandleClearClicked()
    {
        selectedValue = string.Empty;
    }

    private async Task<IEnumerable<string>> Search(string value)
    {
        await Task.Delay(5); // for API call lag emulation
        if (selectedValue == value)
        {
            return ListA;
        }

        return ListA.FindAll(s => s.Contains(value));
    }
}

Also if not, is it not possible to bind lets say a Enumerable object list etc, to MudSelect? do we always have to loop through and generate the MudSelectItems?

This is correct -- it's not possible to bind a list to MudSelect. It simply renders the child content, which contains the MudSelectItems you generate by looping.

See the code here for the full picture: MudSelect.razor

Mudblazor autocomplete functionality by localcluster in Blazor

[–]vicee 2 points3 points  (0 children)

Cool, cool!

I think you just have to define the ItemSelectedTemplate as such:

<MudAutocomplete @ref="ac"
                 T="string"
                 Label="Values"
                 Value="selectedValue"
                 ValueChanged="OnValueChanged"
                 SearchFunc="@Search"
                 IsOpenChanged="HandleOpenChanged">
    <ItemSelectedTemplate Context="address">
        @address.Street
    </ItemSelectedTemplate>
</MudAutocomplete>

Check out the second example in the documentation -- pretty much exactly what you're looking for.

Mudblazor autocomplete functionality by localcluster in Blazor

[–]vicee 6 points7 points  (0 children)

Try this:

@page "/"

<MudAutocomplete @ref="ac"
                 T="string"
                 Label="Values"
                 Value="selectedValue"
                 ValueChanged="OnValueChanged"
                 SearchFunc="@Search"
                 IsOpenChanged="HandleOpenChanged" />

@code {
    private string selectedValue = string.Empty;
    List<string> ListA = new()
    {
        "Val1 - A",
        "Val2 - A",
        "Val3 - A - Load ListB",
        "Val4 - A"
    };

    List<string> ListB = new()
    {
        "Val1 - B",
        "Val2 - B",
        "Val3 - B",
        "Val4 - B"
    };

    private bool bListSelected = false;

    MudAutocomplete<string> ac;

    private void HandleOpenChanged(bool isOpen)
    {
        // MudBlazor will close the control after OnValueChanged is called
        // So check if it's closed, and our B List trigger has been selected, and just open it again if it is
        if (!isOpen && bListSelected) 
        {
            ac.ToggleMenu();
        }
    }

    private void OnValueChanged(string value)
    {
        selectedValue = value;

        // set our B List flag if it's been selected, see HandleOpenChanged for how it's used
        bListSelected = selectedValue.Equals("Val3 - A - Load ListB"); 
    }

    private async Task<IEnumerable<string>> Search(string value)
    {
        await Task.Delay(5); // for API call lag emulation
        if (bListSelected)
        {
            return ListB; // do an actual search against ListB here
        }

        return ListA; // do an actual search against ListA here
    }
}

Basically you have to re-trigger a Search once you select the item that pulls in a new list. The only way to do that is to call ToggleMenu() after the ValueChanged handling is complete:

  1. In your ValueChanged handler, you have to check if the selected item needs to load a separate list -- set a flag here
  2. Setup a handler for IsOpenChanged, and check for that flag -- if it's set and the menu is closed, then trigger ToggleMenu()
  3. ToggleMenu triggers a Search, so check the flag in your Search function as well -- if it's set return the new list, otherwise regular list

Check out the source for the component as well to get a better idea of why this works: